結果
問題 | No.327 アルファベット列 |
ユーザー |
![]() |
提出日時 | 2020-06-22 16:48:01 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 462 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-03 18:42:11 |
合計ジャッジ時間 | 2,965 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
def to_n(x,n,cnt):ans=[]for _ in range(cnt):ans.append(x%n)x//=nreturn ans[::-1]from sys import stdindef main():#入力readline=stdin.readlinen=int(readline())alp=[chr(i) for i in range(65,65+26)]tmp=26cnt=1while n>=tmp:n-=tmptmp*=26cnt+=1m=to_n(n,26,cnt)ans="".join([alp[m[i]] for i in range(cnt)])print(ans)if __name__=="__main__":main()