結果

問題 No.1047 Zero (Novice)
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2020-05-08 21:30:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 77,004 KB
最終ジャッジ日時 2023-09-17 01:43:49
合計ジャッジ時間 3,791 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,436 KB
testcase_01 AC 93 ms
76,332 KB
testcase_02 AC 68 ms
71,536 KB
testcase_03 AC 187 ms
76,652 KB
testcase_04 AC 192 ms
76,716 KB
testcase_05 AC 183 ms
77,004 KB
testcase_06 AC 69 ms
71,224 KB
testcase_07 AC 69 ms
75,652 KB
testcase_08 AC 68 ms
71,132 KB
testcase_09 AC 67 ms
71,456 KB
testcase_10 AC 71 ms
75,496 KB
testcase_11 AC 71 ms
75,728 KB
testcase_12 AC 72 ms
75,452 KB
testcase_13 AC 184 ms
76,788 KB
testcase_14 AC 160 ms
76,484 KB
testcase_15 AC 185 ms
76,960 KB
testcase_16 AC 185 ms
76,940 KB
testcase_17 AC 186 ms
76,980 KB
testcase_18 AC 68 ms
71,264 KB
testcase_19 AC 176 ms
76,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = map(int,input().split())

N = 0
import sys
for i in range(1,10000):

    N = A * N + B

    if N == 0:
        print (i)
        sys.exit()

print (-1)
0