結果
問題 | No.327 アルファベット列 |
ユーザー |
|
提出日時 | 2015-12-20 01:51:51 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 1,402 ms |
コンパイル使用メモリ | 161,112 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 21:10:47 |
合計ジャッジ時間 | 2,768 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;#define REP(i, n) for(int(i)=0;(i)<(n);++(i))#define in(T,V) T V;cin>>V;int main(){in(ll,N);ll r = 1, v = 0;REP(i,10){r *= 26;if(N < r){ v = i; break; }N -= r;}string s;REP(i,v+1){s += ('A' + N % 26);N /= 26;}reverse(s.begin(), s.end());cout << s << endl;}