結果

問題 No.327 アルファベット列
ユーザー kyuna
提出日時 2020-01-07 17:49:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 652 ms
コンパイル使用メモリ 70,272 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-23 01:01:45
合計ジャッジ時間 2,166 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
    long long n; cin >> n;
    auto to_str = [](auto to_str, long long n) -> string {
        if (n == 0) return "";
        n--;
        return to_str(to_str, n / 26) + string(1, 'A' + n % 26);
    };
    cout << to_str(to_str, n + 1) << endl;
    return 0;
}
0