| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158749 | 罗嘉睿 | 过生日 | C++ | Accepted | 1 MS | 268 KB | 403 | 2026-08-22 17:02:18 |
#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; } return 0; }