Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
42266 | jaypei | 年号字符串 | C++ | Accepted | 0 MS | 244 KB | 219 | 2024-02-25 09:51:41 |
#include<iostream> using namespace std; int main() { char s[30]; int a[10],n,cnt=0; cin>>n; while(n){ a[cnt++]=n%26; n/=26; } for(int i=cnt-1;i>=0;i--){ cout<<char('A'+a[i]-1); } return 0; }