记录详情

Accepted

foo.c: In function 'Daybefore':
foo.c:24:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   24 |             case 2:if(q->year%4==0&&q->year%100!=0||q->year%400==0)
      |                       ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
foo.c:11:11: warning: unused variable 'answer' [-Wunused-variable]
   11 |     int l,answer=0;
      |           ^~~~~~
foo.c: In function 'Dayafter':
foo.c:49:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   49 |             case 2:if(p->year%4==0&&p->year%100!=0||p->year%400==0)
      |                       ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
foo.c: In function 'Midday':
foo.c:61:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   61 |     if(d%4==0&&d%100!=0||d%400==0)
      |        ~~~~~~^~~~~~~~~~
foo.c: In function 'main':
foo.c:73:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   73 |         scanf("%d%d%d",&p2.year,&p2.month,&p2.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 1ms 256.0 KiB

信息

递交者
类型
递交
题目
P1005 OO1-4 日期类Date
比赛
2022春 面向对象程序设计方法的上机作业
语言
C
递交时间
2022-05-13 16:47:57
评测时间
2022-05-13 16:47:57
评测机
分数
100
总耗时
11ms
峰值内存
256.0 KiB