Input
第一行一个正整数T,表示数据组数。 接下来T行,每行一个正整数n。 T<=20,n<=2015000000。
Output
对于每组数据,输出一行f(n)。
Sample Input
2 1 20150001Sample Output
2015 20152014
当n<20150001时按n+2014输出,当n>=20150001时你会发现后面所有的f(n)都等于20152014,所以直接输出20152014就行了
代码:
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
long long n;
cin>>n;
if(n<20150001)
cout<<n+2014<<endl;
else
cout<<"20152014"<<endl;
}
}