Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
42256 | lmz120809 | 年号字符串 | C++ | Accepted | 1 MS | 236 KB | 224 | 2024-02-25 09:41:00 |
#include<bits/stdc++.h> 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; }