记录详情

Accepted

foo.c: In function 'main':
foo.c:19:48: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   19 |           if (year % 400 == 0 || year % 4 == 0 && year % 100 != 0)
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
foo.c:21:11: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   21 |           else
      |           ^~~~
foo.c:22:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   22 |               day = 28; break;
      |                         ^~~~~
foo.c:25:5: warning: 'day' may be used uninitialized [-Wmaybe-uninitialized]
   25 |     printf("%d", day);
      |     ^~~~~~~~~~~~~~~~~
foo.c:4:22: note: 'day' was declared here
    4 |     int year, month, day;
      |                      ^~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 284.0 KiB
#2 Accepted 1ms 284.0 KiB
#3 Accepted 1ms 284.0 KiB
#4 Accepted 1ms 280.0 KiB
#5 Accepted 1ms 200.0 KiB

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
比赛
2023年新生赛(第一场)
语言
C
递交时间
2023-08-15 15:04:14
评测时间
2023-08-15 15:04:14
评测机
分数
100
总耗时
8ms
峰值内存
284.0 KiB