| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158790 | 王慕哲 | 过生日 | C++ | Accepted | 1 MS | 272 KB | 522 | 2026-08-22 17:21:55 |
#include<bits/stdc++.h> using namespace std; bool r(int y){ if((y%4==0 && y%100!=0) || y%400==0){ return 1; } return 0; } int main(){ int T; cin>>T; while(T--){ int Y,M; cin>>Y>>M; int c=0; int a; for(int i=Y;;i++){ if(r(i)){ c++; if(c==M){ a=i; break; } } } cout<<a<<endl; } return 0; }