| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158791 | 郦辰希 | 过生日 | C++ | Accepted | 1 MS | 268 KB | 524 | 2026-08-22 17:22:36 |
#include<bits/stdc++.h> using namespace std; bool run(int y){ if(y%400==0 || (y%100!=0 && y%4==0)){ return 1; } return 0; } 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(run(i)){ cnt++; if(cnt==N){ ans=i; break; } } } cout<<ans<<endl; } }