結果
| 問題 | No.327 アルファベット列 |
| コンテスト | |
| ユーザー |
hotpepsi
|
| 提出日時 | 2015-12-23 23:17:19 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 332 bytes |
| 記録 | |
| コンパイル時間 | 674 ms |
| コンパイル使用メモリ | 74,644 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-04-23 09:34:21 |
| 合計ジャッジ時間 | 7,515 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 50 |
ソースコード
#include <iostream>
#include <sstream>
using namespace std;
int main(int argc, char *argv[])
{
long long N, A = 1;
cin >> N;
string ans;
while (true) {
ans += 'A';
A *= 26;
if (A > N) {
break;
}
N -= A;
}
A = ans.length();
while (N > 0) {
ans[--A] += N % 26;
N /= 26;
}
cout << ans << endl;
return 0;
}
hotpepsi