Wrong Answer

foo.cc: In function ‘int main()’:
foo.cc:7:14: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    7 |     if(n%4==0&&n%100!=0||n%400==0)
      |        ~~~~~~^~~~~~~~~~
foo.cc:7:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    7 |     if(n%4==0&&n%100!=0||n%400==0)
      |     ^~
foo.cc:9:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    9 |         if(m%4==0&&m%100!=0||m%400==0)
      |         ^~
foo.cc:9:18: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    9 |         if(m%4==0&&m%100!=0||m%400==0)
      |            ~~~~~~^~~~~~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer On line 1: Read 1, expect 6. 2ms 532.0 KiB
#2 Wrong Answer On line 1: Read 0, expect 1. 2ms 536.0 KiB
#3 Wrong Answer On line 1: Read 0, expect 490. 2ms 504.0 KiB
#4 Wrong Answer On line 1: Read 0, expect 70. 3ms 504.0 KiB

信息

递交者
类型
递交
题目
P2579 求闰年1级2 2023年模拟题
语言
C++
递交时间
2025-07-24 09:03:15
评测时间
2025-07-24 09:03:15
评测机
分数
0
总耗时
10ms
峰值内存
536.0 KiB