結果
| 問題 | No.1047 Zero (Novice) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-29 15:11:37 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 160 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 63,872 KB |
| 最終ジャッジ日時 | 2026-05-10 00:52:24 |
| 合計ジャッジ時間 | 4,232 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 TLE * 1 -- * 12 |
ソースコード
A, B = map(int, input().split())
x = B
i = 1
if A == 0 and B != 0:
print(-1)
exit()
while x != 0:
if x % A == 0:
x //= A
x += B
else:
print(-1)
exit()
i += 1
print(i)