很简单的算法基础题...闰年判断以及计算
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
//freopen("input.txt","r",stdin);
int year,n;
int count;
int T;
int i;
cin>>T;
while(T--)
{
while(cin>>year>>n)
{
count = ;
for(i = year; ; i++)
{
if((i % == && i % != ) || i % ==)
{
count = ;
break;
}
}
while(count < n)
{
i += ;
if((i % == && i % != ) || i % ==)
count++;
}
cout<<i<<endl;
}
} return ;
}