记录详情

Accepted

foo.c: In function 'main':
foo.c:4:15: warning: missing braces around initializer [-Wmissing-braces]
    4 |  int a[2][13]={0,31,28,31,30,31,30,31,31,30,31,30,31,0,31,29,31,30,31,30,31,31,30,31,30,31};
      |               ^
      |                {                                    }{                                    }
foo.c:7:9: warning: zero-length gnu_printf format string [-Wformat-zero-length]
    7 |  printf("");
      |         ^~
foo.c:9:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    9 |  leap=(year%4==0&&year%100!=0||year%400==0);
      |        ~~~~~~~~~^~~~~~~~~~~~~
foo.c:10:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   10 |  for(i=1;i<month;i++)
      |  ^~~
foo.c:12:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   12 |   printf("%d",day);
      |   ^~~~~~
foo.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    8 |  scanf("%d %d %d",&year,&month,&day);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 2ms 256.0 KiB
#2 Accepted 2ms 256.0 KiB
#3 Accepted 2ms 256.0 KiB
#4 Accepted 2ms 256.0 KiB
#5 Accepted 2ms 256.0 KiB

信息

递交者
类型
递交
题目
P1029 A1-4 循环结构练习:今年过去了多少天
语言
C
递交时间
2021-12-28 19:12:48
评测时间
2021-12-28 19:12:48
评测机
分数
100
总耗时
13ms
峰值内存
256.0 KiB