Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158768 王垚植 过生日 C++ Wrong Answer 47 MS 272 KB 476 2026-08-22 17:10:21

Tests(0/1):


Code:

#include<bits/stdc++.h> using namespace std; bool run(int y){ if ((y%100!=0 && y%4==0) || y%400==0){ return 1; } return 0; } int main(){ int T; cin>>T; int y,n,sumi=0; for (int i=0;i<T;i++){ cin>>y>>n; for (int j=y;j<=1000000;j++){ if (run(j)){ sumi++; } if (sumi==n){ cout<<j<<endl; break; } } } return 0; }


Run Info:

------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-----
2036 2000 2040 2212 42828