結果

問題 No.1047 Zero (Novice)
ユーザー nephrologistnephrologist
提出日時 2020-05-11 17:11:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 132 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 8,372 KB
最終ジャッジ日時 2023-09-25 18:11:55
合計ジャッジ時間 3,074 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,040 KB
testcase_01 AC 31 ms
7,848 KB
testcase_02 AC 16 ms
8,144 KB
testcase_03 AC 119 ms
8,172 KB
testcase_04 AC 130 ms
8,368 KB
testcase_05 AC 121 ms
8,368 KB
testcase_06 AC 16 ms
8,156 KB
testcase_07 AC 17 ms
7,836 KB
testcase_08 AC 15 ms
8,184 KB
testcase_09 AC 15 ms
8,184 KB
testcase_10 AC 16 ms
7,840 KB
testcase_11 AC 17 ms
7,884 KB
testcase_12 AC 17 ms
7,788 KB
testcase_13 AC 125 ms
8,212 KB
testcase_14 AC 96 ms
8,200 KB
testcase_15 AC 116 ms
8,304 KB
testcase_16 AC 127 ms
8,324 KB
testcase_17 AC 114 ms
8,256 KB
testcase_18 AC 15 ms
8,124 KB
testcase_19 AC 114 ms
8,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int,input().split())
cur=0
for i in range(10**4):
    cur=a*cur+b
    if cur==0:
        print(i+1)
        exit()
print(-1)
0