結果

問題 No.1232 2^x = x
ユーザー ntudantuda
提出日時 2022-03-20 14:14:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 64,384 KB
最終ジャッジ日時 2024-04-16 06:48:15
合計ジャッジ時間 1,605 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
51,584 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

for _ in range(N):
    p = int(input())
    x = 1
    for i in range(10000):
        x *= 2
        x += i
        x %= p
        if x == 0:
            print(i+2)
            break
    else:
        print(-1)
0