hdu 1076 An Easy Task
2012-04-02 20:38
459 查看
http://acm.hdu.edu.cn/showproblem.php?pid=1076
View Code
View Code
#include<iostream> using namespace std; bool isleap(int year) { if(year%4==0 && year%100!=0) return true; if(year%400==0) return true; return false; } int main() { int t,year,num; cin>>t; while(t--) { cin>>year>>num; int count=0; while(true) { if(isleap(year)) count++; if(count==num) break; year++; } cout<<year<<endl; } return 0; }
相关文章推荐
- hdu 1076 An Easy Task
- Hdu 1076 - An Easy Task
- HDU 1076 An Easy Task
- HDU 1076 An Easy Task
- HDU1076——An Easy Task
- hdu 1076 an easy task
- HDU 1076 An Easy Task
- HDU 1076 An Easy Task
- Hdu 1076 An Easy Task【水】
- hdu1076——An Easy Task
- HDU 1076 An Easy Task
- hdu-oj 1076 An Easy Task
- HDU 1076 An Easy Task(水~)
- HDU 1076 An easy task
- 【HDU】1076 An Easy Task
- hdu 1076 An Easy Task
- 杭电 HDU 1076 An Easy Task
- hdu 1076 An Easy Task (水题)
- hdu 1076 An Easy Task
- hdu 1076 An Easy Task