結果
| 問題 |
No.395 永遠の17歳
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-20 00:46:53 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 1,000 ms |
| コード長 | 406 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-10-01 23:24:12 |
| 合計ジャッジ時間 | 1,317 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
def Base_10_to_n(x, n):
if int(x / n):
return Base_10_to_n(int(x / n), n) + str(x % n)
return str(x % n)
a = int(readline())
for x in range(2, 10 ** 4):
if Base_10_to_n(a, x) == '17':
print(x)
break
else:
print(-1)