HDU 1076 An Easy Task

题解:枚举即可……

#include <cstdio>
int main(){
    int now,y,n,T,count;
    scanf("%d",&T);
    while(T--){
        scanf("%d%d",&y,&n);
        for(now=y;;now++){
            if((now%4==0&&now%100!=0)||(now%400)==0)n--;
            if(!n){printf("%d\n",now);break;}
         }
    }return 0;
}
posted @ 2014-08-29 16:50  forever97  阅读(191)  评论(0编辑  收藏  举报