結果

問題 No.1218 Something Like a Theorem
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-22 01:04:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 1,264 ms
コンパイル使用メモリ 81,480 KB
実行使用メモリ 59,664 KB
最終ジャッジ日時 2023-10-21 12:19:37
合計ジャッジ時間 2,023 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,268 KB
testcase_01 AC 45 ms
59,396 KB
testcase_02 AC 39 ms
53,268 KB
testcase_03 AC 39 ms
53,268 KB
testcase_04 AC 39 ms
53,268 KB
testcase_05 AC 58 ms
57,348 KB
testcase_06 AC 39 ms
53,268 KB
testcase_07 AC 53 ms
59,664 KB
testcase_08 AC 58 ms
59,664 KB
testcase_09 AC 76 ms
59,664 KB
testcase_10 AC 47 ms
59,396 KB
testcase_11 AC 38 ms
53,268 KB
testcase_12 AC 38 ms
53,268 KB
testcase_13 AC 39 ms
53,268 KB
testcase_14 AC 38 ms
53,268 KB
testcase_15 AC 38 ms
53,268 KB
testcase_16 AC 39 ms
53,268 KB
testcase_17 AC 39 ms
53,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, z = map(int, input().split())
zp = pow(z, n, 10 ** 9)

for x in range(1, z):
    x = pow(x, n, 10 ** 9)
    for y in range(1, z):
        y = pow(y, n, 10 ** 9)
        if x + y == zp:
            print("Yes")
            exit()
print("No")
0