結果

問題 No.327 アルファベット列
ユーザー mathshabmathshab
提出日時 2017-07-03 07:44:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 987 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 12,928 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-15 13:40:16
合計ジャッジ時間 3,160 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
11,008 KB
testcase_01 AC 30 ms
11,008 KB
testcase_02 AC 30 ms
10,880 KB
testcase_03 AC 30 ms
10,880 KB
testcase_04 AC 30 ms
10,880 KB
testcase_05 AC 31 ms
10,880 KB
testcase_06 AC 29 ms
10,880 KB
testcase_07 AC 30 ms
11,008 KB
testcase_08 AC 30 ms
10,880 KB
testcase_09 AC 30 ms
10,880 KB
testcase_10 AC 29 ms
10,880 KB
testcase_11 AC 30 ms
10,880 KB
testcase_12 AC 30 ms
11,008 KB
testcase_13 AC 30 ms
11,008 KB
testcase_14 AC 29 ms
11,008 KB
testcase_15 AC 30 ms
10,880 KB
testcase_16 AC 31 ms
10,880 KB
testcase_17 AC 31 ms
10,880 KB
testcase_18 AC 30 ms
10,880 KB
testcase_19 AC 31 ms
10,880 KB
testcase_20 AC 31 ms
10,880 KB
testcase_21 AC 31 ms
10,880 KB
testcase_22 AC 30 ms
11,008 KB
testcase_23 AC 30 ms
10,880 KB
testcase_24 AC 30 ms
10,880 KB
testcase_25 AC 30 ms
10,880 KB
testcase_26 AC 30 ms
10,880 KB
testcase_27 AC 30 ms
11,008 KB
testcase_28 AC 30 ms
10,880 KB
testcase_29 AC 30 ms
10,880 KB
testcase_30 AC 30 ms
10,880 KB
testcase_31 AC 30 ms
10,880 KB
testcase_32 AC 30 ms
10,880 KB
testcase_33 AC 30 ms
10,880 KB
testcase_34 AC 30 ms
10,880 KB
testcase_35 AC 32 ms
11,008 KB
testcase_36 AC 31 ms
11,008 KB
testcase_37 AC 31 ms
11,008 KB
testcase_38 AC 31 ms
10,880 KB
testcase_39 AC 30 ms
10,880 KB
testcase_40 AC 30 ms
10,880 KB
testcase_41 AC 29 ms
10,880 KB
testcase_42 AC 30 ms
11,008 KB
testcase_43 AC 30 ms
11,008 KB
testcase_44 AC 30 ms
10,880 KB
testcase_45 AC 30 ms
10,880 KB
testcase_46 AC 29 ms
10,880 KB
testcase_47 AC 29 ms
10,880 KB
testcase_48 AC 30 ms
10,880 KB
testcase_49 AC 31 ms
10,880 KB
testcase_50 AC 30 ms
10,880 KB
testcase_51 AC 30 ms
10,880 KB
testcase_52 AC 30 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def nta(N):
    if N==0:
        a="A"
    elif N==1: 
        a="B"
    elif N==2:
        a="C"
    elif N==3:
        a="D"
    elif N==4:
        a="E"
    elif N==5:
        a="F"
    elif N==6:
        a="G"
    elif N==7:
        a="H"
    elif N==8:
        a="I"
    elif N==9:
        a="J"
    elif N==10:
        a="K"
    elif N==11:
        a="L"
    elif N==12:
        a="M"
    elif N==13:
        a="N"
    elif N==14:
        a="O"
    elif N==15:
        a="P"
    elif N==16:
        a="Q"
    elif N==17:
        a="R"
    elif N==18:
        a="S"
    elif N==19:
        a="T"
    elif N==20:
        a="U"
    elif N==21:
        a="V"
    elif N==22:
        a="W"
    elif N==23:
        a="X"
    elif N==24:
        a="Y"
    elif N==25:
        a="Z"
    return a
Nu=int(input())
R=Nu%26
S=""
S+=nta(R)
Q=Nu//26
while Q>26:
    R=Q%26
    if R==0:
        R=25
        Q-=26
    else:
        R-=1
    S=nta(R)+S
    Q//=26
if Q>0:
    S=nta(Q-1)+S
print(S)
0