結果
| 問題 |
No.327 アルファベット列
|
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-07-01 16:47:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 995 bytes |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 18,384 KB |
| 最終ジャッジ日時 | 2024-10-05 05:43:20 |
| 合計ジャッジ時間 | 3,641 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 |
| other | -- * 50 |
ソースコード
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)
Nu-=R
Nu//=26
f=0
if Nu==1:
f=1
while Nu>1 or f==1:
R=Nu%26
Nu-=R
if R==0:
R=25
else:
R-=1
S=nta(R)+S
Nu//=26
print(S)
rocoder