結果

問題 No.1232 2^x = x
ユーザー hir355hir355
提出日時 2020-09-18 21:42:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 221 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 7,988 KB
最終ジャッジ日時 2023-09-04 10:14:01
合計ジャッジ時間 1,061 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,988 KB
testcase_01 AC 23 ms
7,848 KB
testcase_02 AC 27 ms
7,776 KB
testcase_03 AC 28 ms
7,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
for i in range(n):
    p = int(input())
    if p == 2:
        print(2)
    else:
        print((p - 1) * (p - 1))
        t = (p - 1) * (p - 1)
        if pow(2, t, p) != t % p:
            print('WTF')
0