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
",now);break;}
         }
    }return 0;
}
原文地址:https://www.cnblogs.com/forever97/p/3945325.html