#include<iostream>
using namespace std;
int main()
{
int Y;
int ntime=0;cin>>ntime;
int n;
for(;ntime--;)
{
cin>>Y>>n;
for(int i=0;i<n;Y++)
{
if ((Y%4==0 && Y%100!=0) || Y%400==0) i++;
}
cout<<Y-1<<endl;
}
return 0;
}
Saturday, 21 March 2009
HOJ ( acm.hdu.edu.cn ) 1076
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment