Wrong Answer

foo.cc: In function 'int main()':
foo.cc:12:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   12 |   if(y=12) t+=30;
      |      ~^~~
foo.cc:13:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   13 |   if(y=11) t+=31;
      |      ~^~~
foo.cc:14:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   14 |   if(y=10) t+=30;
      |      ~^~~
foo.cc:15:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   15 |   if(y=9) t+=31;
      |      ~^~
foo.cc:16:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   16 |   if(y=8) t+=31;
      |      ~^~
foo.cc:17:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   17 |   if(y=7) t+=30;
      |      ~^~
foo.cc:18:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   18 |   if(y=6) t+=31;
      |      ~^~
foo.cc:19:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   19 |   if(y=5) t+=30;
      |      ~^~
foo.cc:20:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   20 |   if(y=4) t+=31;
      |      ~^~
foo.cc:21:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   21 |   if(y=3) t+=28;
      |      ~^~
foo.cc:22:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   22 |   if(y=2) t+=31;
      |      ~^~
foo.cc:23:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   23 |   if(y=1);
      |      ~^~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 334, expect 1. 4ms 384.0 KiB
#2 Wrong Answer Read 335, expect 62. 5ms 384.0 KiB
#3 Wrong Answer Read 334, expect 365. 4ms 384.0 KiB
#4 Wrong Answer Read 334, expect 365. 2ms 396.0 KiB
#5 Wrong Answer Read 334, expect 344. 4ms 384.0 KiB

信息

递交者
类型
递交
题目
P1029 A1-4 循环结构练习:今年过去了多少天
语言
C++
递交时间
2022-01-10 09:21:20
评测时间
2022-01-10 09:21:20
评测机
分数
0
总耗时
21ms
峰值内存
396.0 KiB