This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |