Submission #12841

#TimeUsernameProblemLanguageResultExecution timeMemory
12841yongwhan간지(干支) (KOI13_kanji)C++98
14 / 14
676 ms111364 KiB
#include<map> #include<string> #include<iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int x=2013; string s="F9"; map<int,string> mp; int cur=x; for (int i=0; i<2013; i++) { cur--; char a=s[0], b=s[1]; if(a=='A') a='L'; else a--; if(b=='0') b='9'; else b--; s=a; s+=b; mp[cur]=s; } cur=x; s="F9"; for (int i=0; i<1e6+5; i++) { cur++; char a=s[0], b=s[1]; if(a=='L') a='A'; else a++; if(b=='9') b='0'; else b++; s=a; s+=b; mp[cur]=s; } int n; cin>>n; cout << mp[n] << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...