Wrong Answer

foo.cc: In function 'int main()':
foo.cc:7:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    7 |         if(n<=6)
      |         ^~
foo.cc:10:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   10 |                 if(d=0)
      |                 ^~
foo.cc:10:21: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   10 |                 if(d=0)
      |                    ~^~
foo.cc:11:20: warning: statement has no effect [-Wunused-value]
   11 |                   p+1;
      |                   ~^~
foo.cc:16:21: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   16 |                 if(d=0)
      |                    ~^~
foo.cc:17:20: warning: statement has no effect [-Wunused-value]
   17 |                   p+1;
      |                   ~^~
foo.cc:22:21: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   22 |                 if(d=0)
      |                    ~^~
foo.cc:23:20: warning: statement has no effect [-Wunused-value]
   23 |                   p+1;
      |                   ~^~
foo.cc:5:17: warning: unused variable 't' [-Wunused-variable]
    5 |         int n,p,t=120,d;
      |                 ^
foo.cc:12:15: warning: 'p' is used uninitialized [-Wuninitialized]
   12 |         cout<<p;
      |               ^
foo.cc:5:15: note: 'p' was declared here
    5 |         int n,p,t=120,d;
      |               ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 000, expect 1. 3ms 284.0 KiB
#2 Wrong Answer Read 000, expect 1. 2ms 284.0 KiB
#3 Wrong Answer Read 000, expect 1. 2ms 284.0 KiB
#4 Wrong Answer Read 000, expect 2. 2ms 284.0 KiB
#5 Wrong Answer Read 000, expect 2. 1ms 284.0 KiB
#6 Wrong Answer Read 000, expect 2. 2ms 324.0 KiB
#7 Wrong Answer Read 000, expect 4. 2ms 336.0 KiB
#8 Wrong Answer Read 000, expect 4. 2ms 284.0 KiB
#9 Wrong Answer Read 000, expect 4. 2ms 284.0 KiB
#10 Wrong Answer Read 000, expect 4. 2ms 284.0 KiB

信息

递交者
类型
递交
题目
P1005 至少要买几瓶止咳糖浆
语言
C++
递交时间
2023-05-22 09:55:47
评测时间
2023-05-22 09:55:47
评测机
分数
0
总耗时
24ms
峰值内存
336.0 KiB