結果

問題 No.984 Inversion
ユーザー chielochielo
提出日時 2020-02-11 14:39:57
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 117 bytes
コンパイル時間 966 ms
使用メモリ 75,824 KB
最終ジャッジ日時 2022-11-24 17:50:25
合計ジャッジ時間 3,940 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 73 ms
75,616 KB
testcase_01 AC 76 ms
75,712 KB
testcase_02 AC 77 ms
75,672 KB
testcase_03 AC 74 ms
75,592 KB
testcase_04 AC 72 ms
75,516 KB
testcase_05 AC 73 ms
75,556 KB
testcase_06 AC 74 ms
75,756 KB
testcase_07 AC 74 ms
75,444 KB
testcase_08 AC 73 ms
75,744 KB
testcase_09 AC 73 ms
75,568 KB
testcase_10 AC 73 ms
75,512 KB
testcase_11 AC 72 ms
75,328 KB
testcase_12 AC 72 ms
75,668 KB
testcase_13 AC 76 ms
75,800 KB
testcase_14 AC 75 ms
75,512 KB
testcase_15 AC 74 ms
75,460 KB
testcase_16 AC 74 ms
75,752 KB
testcase_17 AC 73 ms
75,512 KB
testcase_18 AC 76 ms
75,428 KB
testcase_19 AC 77 ms
75,592 KB
testcase_20 AC 78 ms
75,392 KB
testcase_21 AC 77 ms
75,740 KB
testcase_22 AC 75 ms
75,572 KB
testcase_23 AC 76 ms
75,544 KB
testcase_24 AC 75 ms
75,748 KB
testcase_25 AC 76 ms
75,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p, n = map(int, input().split())
if p == 2:
    print(int(n != 1))
else:
    print(int(pow(n, (p - 1) // 2, p) != 1))
0