Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
145579 张晓冉 判断闰年I C++ Compile Error 0 MS 0 KB 203 2026-01-25 16:40:51

Tests(0/0):


Code:

#include<cstdio> using namespace std; int main() { int year; cin>>year; if(year > 2500 || year < 2000) return 1; if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0) return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:5: error: 'cin' was not declared in this scope
     cin>>year;
     ^
Main.cc:7:22: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(year % 4 == 0 && year % 100 != 0  || year % 400 == 0)
                      ^