Andrew-Malcom edited 3 年,9 月前
#include<bits/stdc++.h>
using namespace std;
vector<string>year1={"2","3","4","5","6","7","8","9"};
vector<string>year2={"0","1","2","3","4","5"};
vector<string>year3={"0","1","2","3","4","5","6","7","8","9"};
vector<string>year4={"0","1","2","3","4","5"};
vector<string>month={"01","02","10","11","12"};
vector<string>day={"1","2"};
int main()
{
int k,i,j;
int lday=1,lmonth=0,lyear1=0,lyear2=0,lyear3=2,lyear4=0;
cin>>k;
if(k==0){
cout<<"20200122100202";
}
else{
for(i=1;i<=k;i++){
lday+=1;
if(lday==day.size()){
lday=0;
lmonth+=1;
}
if(lmonth==month.size()){
lmonth=0;
lyear4+=1;
}
if(lyear4==year4.size()){
lyear4=0;
lyear3+=1;
}
if(lyear3==year3.size()){
lyear3=0;
lyear2+=1;
}
if(lyear2==year2.size()){
lyear2=0;
lyear1+=1;
}
}
string s=year1[lyear1]+year2[lyear2]+year3[lyear3]+year4[lyear4]+month[lmonth]+day[lday];
cout<<s;
reverse(s.begin(),s.end());
cout<<s;
}
}