记录详情

Wrong Answer

foo.c: In function ‘main’:
foo.c:21:21: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   21 |         if(year%4==0&&year%100!=0||year%400==0)
      |            ~~~~~~~~~^~~~~~~~~~~~~
foo.c:25:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   25 |         if(year=1&&month>2)
      |            ^~~~
foo.c:4:32: warning: variable ‘leap’ set but not used [-Wunused-but-set-variable]
    4 |         int year,month,day,sum,leap;
      |                                ^~~~
foo.c:27:20: warning: ‘sum’ may be used uninitialized [-Wmaybe-uninitialized]
   27 |                 sum++;
      |                 ~~~^~
foo.c:4:28: note: ‘sum’ was declared here
    4 |         int year,month,day,sum,leap;
      |                            ^~~
# 状态 耗时 内存占用
#1 Wrong Answer Read 345, expect 344. 1ms 324.0 KiB
#2 Wrong Answer Read 366, expect 365. 1ms 288.0 KiB
#3 Accepted 1ms 516.0 KiB
#4 Wrong Answer Read 366, expect 365. 1ms 516.0 KiB
#5 Accepted 1ms 288.0 KiB

信息

递交者
类型
递交
题目
A1-4 分支结构练习:今年过去了多少天
比赛
南师大(含泰州学院)2024年新生赛(第一场)
语言
C
递交时间
2024-08-15 18:12:36
评测时间
2024-08-15 18:12:36
评测机
分数
40
总耗时
7ms
峰值内存
516.0 KiB