记录详情

Wrong Answer

foo.c: In function 'days_date':
foo.c:3:30: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    3 | #define leapYear(y) ((y%4==0)&&(y%100!=0)||(y%400==0))
      |                      ~~~~~~~~^~~~~~~~~~~~
foo.c:16:21: note: in expansion of macro 'leapYear'
   16 |                 if (leapYear(i))
      |                     ^~~~~~~~
foo.c:3:30: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    3 | #define leapYear(y) ((y%4==0)&&(y%100!=0)||(y%400==0))
      |                      ~~~~~~~~^~~~~~~~~~~~
foo.c:21:21: note: in expansion of macro 'leapYear'
   21 |                 if (leapYear(i))
      |                     ^~~~~~~~
foo.c: In function 'diff':
foo.c:32:16: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   32 |         return abs(days_date(s1) - days_date(s2));
      |                ^~~
foo.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include <math.h>
  +++ |+#include <stdlib.h>
    3 | #define leapYear(y) ((y%4==0)&&(y%100!=0)||(y%400==0))
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 6718, expect 6717. 1ms 284.0 KiB
#2 Wrong Answer Read 18416, expect 18415. 2ms 284.0 KiB
#3 Accepted 2ms 284.0 KiB
#4 Accepted 1ms 284.0 KiB
#5 Wrong Answer Read 5113, expect 5114. 1ms 284.0 KiB

信息

递交者
类型
递交
题目
5-6 过去了多少天
比赛
2023 程序设计与竞赛(作业3:中秋和国庆)
语言
C
递交时间
2023-10-01 16:03:38
评测时间
2023-10-01 16:03:38
评测机
分数
40
总耗时
9ms
峰值内存
284.0 KiB