| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158751 | 陈襗葳 | 过生日 | C++ | Compile Error | 0 MS | 0 KB | 561 | 2026-08-22 17:03:17 |
#include <iostream> using namespace std; bool is_leap(int y) { if((y%4==0 && y%100!=0) || y%400==0){ return true; return false; } } int main() { int T; cin >> T; while(T--) { int Y,N; Cin >> Y >> N; int cnt = 0; int ans; for(int i=Y; ;i++){ if(is_leap(i)) { cnt++; if(cnt == N) { ans = i; break; } } } cout << ans << endl; } }
Main.cc: In function 'int main()':
Main.cc:14:9: error: 'Cin' was not declared in this scope
Cin >> Y >> N;
^
Main.cc: In function 'bool is_leap(int)':
Main.cc:8:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^