Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
5162 | admin | 过生日 | C++ | 通过 | 100 | 2 MS | 260 KB | 265 | 2025-01-23 15:15:16 |
#include <bits/stdc++.h> using namespace std; int main() { int t,y,n,m; cin>>t; while(t--) { cin>>y>>n; m=0; while(1) { if((y%4==0&&y%100!=0)||y%400==0 ) m++; if(m==n) break; y++; } printf("%d\n",y); } return 0; }