結果

問題 No.327 アルファベット列
ユーザー ronpoo
提出日時 2023-09-19 11:06:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 1,680 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-07-05 21:39:42
合計ジャッジ時間 4,092 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

v = N
arr = []
while v > 0:
    v, b = divmod(v, 26)
    arr.append(b)
arr.reverse()
if len(arr) > 1:
    arr[0] -= 1
if N == 0:
    ans = 'A'
else:
    ans = ''
for v in arr:
    ans += chr(v + ord('A'))
print(ans)
0