Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138146 hjx433333 过生日 C++ Accepted 1 MS 272 KB 296 2025-11-23 12:58:01

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int i,j,k,n,y,t,s; cin>>t; while (t--) { s=0; cin>>y>>n; while (true) { if (y%400==0 and y%100==0 or y%4==0 and y%100!=0) s++; if (s==n) break; y++; } cout<<y<<endl; } return 0; }