結果

問題 No.327 アルファベット列
ユーザー mencotton
提出日時 2020-11-02 21:12:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 70,940 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-22 08:03:10
合計ジャッジ時間 1,814 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 47
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    long long n;
    cin >> n;

    string ret;
    do {
        ret = string(1, 'A' + n % 26) + ret;
        n /= 26;
    } while (n > 26);
    if (n > 0) ret = string(1, 'A' + n - 1) + ret;

    cout << ret << endl;
    return 0;
}
0