結果

問題 No.327 アルファベット列
ユーザー matsu7874
提出日時 2015-12-20 03:27:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-09-17 11:18:35
合計ジャッジ時間 2,968 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

import string

N = int(input())
S = ''
while True:
    if N < 26:
        S += string.ascii_uppercase[N]
        break
    else:
        t = 26
        while t * 27 < N + 1:
            t *= 26
        S += (string.ascii_uppercase)[N % (t * 26) // t - 1]
        N -= N // t * t
print(S)
0