結果
問題 | No.499 7進数変換 |
ユーザー |
|
提出日時 | 2021-09-29 16:55:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 1,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 318 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 53,612 KB |
最終ジャッジ日時 | 2024-07-16 12:29:36 |
合計ジャッジ時間 | 2,460 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#!/usr/bin/env python3 import sys def main(): N = int(input()) def base10toKint(base10value, toBase): ans = [] p = base10value while p >= toBase: p, q = divmod(p, toBase) ans.append(str(q)) ans.append(str(p)) return "".join(ans[::-1]) num = base10toKint(base10value=N, toBase=7) print(num) if __name__ == '__main__': main()