记录详情

Wrong Answer

foo.c: In function 'days':
foo.c:2:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
 #define leap(y) ((y)%4==0 && (y)%100!=0 || (y)%400==0)
                  ~~~~~~~~~^~~~~~~~~~~~~
foo.c:12:5: note: in expansion of macro 'leap'
 td+=leap(i)?366:365;
     ^~~~
foo.c:2:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
 #define leap(y) ((y)%4==0 && (y)%100!=0 || (y)%400==0)
                  ~~~~~~~~~^~~~~~~~~~~~~
foo.c:14:9: note: in expansion of macro 'leap'
 td-=mon[leap(d1.y)][i];
         ^~~~
foo.c:2:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
 #define leap(y) ((y)%4==0 && (y)%100!=0 || (y)%400==0)
                  ~~~~~~~~~^~~~~~~~~~~~~
foo.c:17:9: note: in expansion of macro 'leap'
 td+=mon[leap(d2.y)][i];
         ^~~~
foo.c: In function 'main':
foo.c:24:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d-%d-%d", &d1.y,&d1.m,&d1.d);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:25:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d-%d-%d", &d2.y,&d2.m,&d2.d);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer User output longer than standard answer. 1ms 256.0 KiB
#2 Wrong Answer User output longer than standard answer. 1ms 256.0 KiB
#3 Wrong Answer User output longer than standard answer. 1ms 256.0 KiB
#4 Wrong Answer User output longer than standard answer. 1ms 256.0 KiB
#5 Wrong Answer User output longer than standard answer. 1ms 256.0 KiB

信息

递交者
类型
递交
题目
15-1 改错题
语言
C
递交时间
2021-01-13 10:41:53
评测时间
2021-01-13 10:41:53
评测机
分数
0
总耗时
5ms
峰值内存
256.0 KiB