結果
問題 | No.499 7進数変換 |
ユーザー |
![]() |
提出日時 | 2022-08-03 13:42:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 1,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-13 04:33:47 |
合計ジャッジ時間 | 2,010 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
N=int(input())#変換したい10進数の値K=7#進数if N==0:print(0)exit()def change(N,shinsu):keta=0for i in range(10**9):if N<shinsu**i:keta+=ibreakans=[0]*ketacheck=0for i in range(1,keta+1):j=N//(shinsu**(keta-i))ans[check]=jcheck+=1N-=(j)*(shinsu**(keta-i))return anss=change(N,K)ans=""for x in s:ans+=str(x)print(ans)