Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:13:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   13 |         if(y%4==0&&y%100!=0||y%400==0)
      |            ~~~~~~^~~~~~~~~~
/in/foo.cc:45:9: error: expected primary-expression before '}' token
   45 |         }
      |         ^
/in/foo.cc:46:9: error: expected '}' before 'else'
   46 |         else
      |         ^~~~
/in/foo.cc:14:9: note: to match this '{'
   14 |         {
      |         ^
/in/foo.cc: At global scope:
/in/foo.cc:55:9: error: expected unqualified-id before 'if'
   55 |         if(m>12)
      |         ^~
/in/foo.cc:60:9: error: 'cout' does not name a type
   60 |         cout<<y<<" "<<m<<" "<<d<<" "<<h;
      |         ^~~~
/in/foo.cc:61:1: error: expected declaration before '}' token
   61 | }
      | ^

信息

递交者
类型
递交
题目
P2881 时间跨越2025.3GESP2级T2
语言
C++
递交时间
2025-12-09 20:26:21
评测时间
2025-12-09 20:26:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes