結果
| 問題 |
No.327 アルファベット列
|
| コンテスト | |
| ユーザー |
springroll
|
| 提出日時 | 2018-11-19 13:37:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 521 bytes |
| コンパイル時間 | 1,588 ms |
| コンパイル使用メモリ | 170,252 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-24 15:16:11 |
| 合計ジャッジ時間 | 3,206 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 50 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string AtoZ;
int main() {
ll N;
cin >> N;
list<char> lst;
for(char ch='A'; ch<='Z'; ch++){
AtoZ.push_back(ch);
}
while(1){
ll x;
x = N%26;
lst.push_front(AtoZ[x]);
N /= 26;
if(N==1){
lst.push_front('A');
break;
}
if(N==0) break;
}
for(auto itr=lst.begin(); itr!=lst.end(); itr++){
cout << *itr;
}
cout << endl;
}
springroll