首页 > 代码库 > HDU 1076 An Easy Task

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;}

HDU 1076 An Easy Task