Accepted

foo.cc: In function ‘int f(int, int, int)’:
foo.cc:8:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    8 |         if(a%4==0&&a%100!=0||a%400==0)
      |            ~~~~~~^~~~~~~~~~
foo.cc:11:20: warning: ‘ans’ may be used uninitialized [-Wmaybe-uninitialized]
   11 |                 ans+=mon[i];
      |                 ~~~^~~~~~~~
foo.cc:7:13: note: ‘ans’ was declared here
    7 |         int ans;
      |             ^~~
# 状态 耗时 内存占用
#1 Accepted 2ms 512.0 KiB
#2 Accepted 2ms 512.0 KiB
#3 Accepted 2ms 508.0 KiB
#4 Accepted 2ms 512.0 KiB
#5 Accepted 3ms 512.0 KiB

信息

递交者
类型
递交
题目
P1029 A1-4 循环结构练习:今年过去了多少天
比赛
2026.5.1中级班练习
语言
C++
递交时间
2026-05-01 14:37:36
评测时间
2026-05-01 14:37:36
评测机
分数
100
总耗时
14ms
峰值内存
512.0 KiB