记录详情

Runtime Error

foo.c: In function 'main':
foo.c:6:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
  scanf("%d",y);
         ~^
foo.c:7:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
  scanf("%d",m);
         ~^
foo.c:8:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
  scanf("%d",d);
         ~^
foo.c:15:22: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   if(y%400==0||y%4==0&&y%100!=0)
                ~~~~~~^~~~~~~~~~
foo.c:24:7: warning: statement with no effect [-Wunused-value]
  for(j==2020;j>y;j--)
      ~^~~~~~
foo.c:25:22: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   if(j%400==0||j%4==0&&j%100!=0)
                ~~~~~~^~~~~~~~~~
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",y);
  ^~~~~~~~~~~~~
foo.c:7:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",m);
  ^~~~~~~~~~~~~
foo.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",d);
  ^~~~~~~~~~~~~
foo.c:6:2: warning: 'y' is used uninitialized in this function [-Wuninitialized]
  scanf("%d",y);
  ^~~~~~~~~~~~~
foo.c:7:2: warning: 'm' is used uninitialized in this function [-Wuninitialized]
  scanf("%d",m);
  ^~~~~~~~~~~~~
foo.c:8:2: warning: 'd' is used uninitialized in this function [-Wuninitialized]
  scanf("%d",d);
  ^~~~~~~~~~~~~
foo.c:25:25: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
   if(j%400==0||j%4==0&&j%100!=0)
                        ~^~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 1ms 256.0 KiB
#2 Runtime Error Segmentation fault 1ms 256.0 KiB
#3 Runtime Error Segmentation fault 1ms 256.0 KiB
#4 Runtime Error Segmentation fault 1ms 256.0 KiB
#5 Runtime Error Segmentation fault 1ms 256.0 KiB

信息

递交者
类型
递交
比赛
2021年中北算法竞赛队招新测试
语言
C
递交时间
2021-10-24 16:45:28
评测时间
2021-10-24 16:45:28
评测机
分数
0
总耗时
5ms
峰值内存
256.0 KiB