結果
問題 | No.327 アルファベット列 |
ユーザー |
![]() |
提出日時 | 2018-08-03 14:19:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 1,656 ms |
コンパイル使用メモリ | 166,796 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 17:21:40 |
合計ジャッジ時間 | 2,972 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#include<bits/stdc++.h>using namespace std;using Int = long long;//INSERT ABOVE HEREsigned main(){Int n;cin>>n;n++;Int l=0,b=1;while(b<=n){n-=b;l++;b*=26;}//cout<<n<<" "<<l<<endl;string s(l,'#');for(Int i=0;i<l;i++)s[i]=char('A'+n%26),n/=26;reverse(s.begin(),s.end());cout<<s<<endl;return 0;}