Contest1349 - 【Hard】宁波赛前练习T1
http://magic.vicp.io/JudgeOnline/problem.php?cid=1349&pid=0
#include <bits/stdc++.h>
using namespace std;
int main()
{
int p(0);
int t;
scanf("%d",&t);
while (t)
{
if (t>1899) p=t;
else
{
if (p%100<=t)
{
if (t>9)
printf("%d%d\n",p/100,t);
else
printf("%d0%d\n",p/100,t);
}
else
{
if (t>9)
printf("%d%d\n",p/100+1,t);
else
printf("%d0%d\n",p/100+1,t);
}
}
scanf("%d",&t);
}
return 0;
}