結果
| 問題 |
No.327 アルファベット列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-07-15 15:29:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 312 bytes |
| コンパイル時間 | 557 ms |
| コンパイル使用メモリ | 67,924 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-15 01:11:10 |
| 合計ジャッジ時間 | 1,747 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 21 |
ソースコード
#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
int main() {
long long n;
cin >> n;
string s;
if (n == 0) {
s = "A";
} else {
while (n > 0) {
s += 'A' + n % 26 - 1;
n /= 26;
}
s[0]++;
reverse(s.begin(), s.end());
}
cout << s << endl;
}