結果

問題 No.1047 Zero (Novice)
ユーザー Shirotsume
提出日時 2021-10-25 02:00:09
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 141 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 81,972 KB
実行使用メモリ 266,372 KB
最終ジャッジ日時 2024-10-02 09:05:22
合計ジャッジ時間 5,171 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

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