結果
| 問題 |
No.1047 Zero (Novice)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-13 22:34:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 226 bytes |
| コンパイル時間 | 95 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-08 11:03:13 |
| 合計ジャッジ時間 | 1,706 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 1 |
ソースコード
A, B = map(int, input().split())
count = 0
N = 0
if ((A == -1 or A == 1) and A * B < 0) or B == 0:
while 1:
count += 1
N = A * N + B
if N == 0:
break
print(count)
else:
print(-1)