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; }
愿你出走半生,归来仍是少年