| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158789 | 王慕哲 | 过生日 | C++ | Wrong Answer | 1 MS | 272 KB | 516 | 2026-08-22 17:20:55 |
#include<bits/stdc++.h> using namespace std; bool r(int y){ if((y%4==0 && y%100!=0) || y%400==0){ return 1; } return 0; } int main(){ int T; cin>>T; while(T--){ int Y,M; cin>>Y>>M; int c=0; int a; for(int i=Y;;i++){ if(r(i)){ c++; if(c==M){ a=i; break; } } } cout<<a; } return 0; }
------Input------
20 2000 10 1999 11 1989 24 1900 100 2008 10000 2012 111 2013 123 1994 1 1996 1 2004 1 2011 1 1899 1 1988 900 2015 2000 1896 5000 1999 9 2001 3333 3000 400 1888 8888 2010 9000
------Answer-----
2036 2040 2084 2312 43240 2464 2520 1996 1996 2004 2012 1904 5692 10260 22512 2032 15744 4648 38536 39124
------Your output-----
20362040208423124324024642520199619962004201219045692102602251220321574446483853639124