标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 17573 Accepted Submission(s):
11213
1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 int main() 5 { 6 int n,a,b; 7 scanf("%d",&n); 8 while(n--) 9 { 10 scanf("%d%d",&a,&b); 11 while(b!=0) 12 { 13 if((a%4==0&&a%100!=0)||a%400==0) 14 b--; 15 if(!b) 16 break; 17 a++; 18 } 19 printf("%d\n",a); 20 21 } 22 return 0; 23 }
标签:
原文地址:http://www.cnblogs.com/pshw/p/4815723.html