Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
42253 | Xiyou | 年号字符串 | C++ | Accepted | 0 MS | 248 KB | 229 | 2024-02-25 09:40:03 |
#include<bits/stdc++.h> using namespace std; int main(){ char s[30]; int a[10],n; cin>>n; int cnt=0; while(n){ a[cnt++]=n%26; n/=26; } for(int i=cnt-1;i>=0;i--){ cout<<char('A'+a[i]-1); } return 0; }