Accepted

foo.cc: In function ‘int main()’:
foo.cc:8:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    8 |         if(i%4==0&&i%100!=0||i%400==0)
      |            ~~~~~~^~~~~~~~~~
foo.cc:7:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
    7 |     for(int i=m;i<=n;i++)
      |     ^~~
foo.cc:10:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
   10 |         cout<<cnt;
      |         ^~~~
# 状态 耗时 内存占用
#1 Accepted 2ms 504.0 KiB
#2 Accepted 2ms 504.0 KiB
#3 Accepted 2ms 508.0 KiB
#4 Accepted 2ms 760.0 KiB

信息

递交者
类型
递交
题目
P2579 求闰年1级2 2023年模拟题
语言
C++
递交时间
2025-08-14 17:50:07
评测时间
2025-08-14 17:50:07
评测机
分数
100
总耗时
10ms
峰值内存
760.0 KiB