Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
42262 | yanghaowen | 年号字符串 | C++ | Accepted | 0 MS | 248 KB | 242 | 2024-02-25 09:47:46 |
#include<iostream> using namespace std; int main(){ 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; }