提交时间:2025-01-24 09:44:43

运行 ID: 5226

#include <bits/stdc++.h> using namespace std; int main() { int x,y,n,cnt; cin>> x; while(x--) { cin >> y >> n; cnt=0; while(cnt<n) { if(y%4==0&&y%100!=0||y%400==0) { cnt++; } y++; } cout << y-1 << endl; } return 0; }