結果

問題 No.1218 Something Like a Theorem
ユーザー raven7959raven7959
提出日時 2021-08-03 22:09:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 219 ms / 2,000 ms
コード長 177 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 241,200 KB
最終ジャッジ日時 2023-10-14 21:11:01
合計ジャッジ時間 3,192 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,164 KB
testcase_01 AC 76 ms
71,240 KB
testcase_02 AC 77 ms
71,156 KB
testcase_03 AC 80 ms
70,992 KB
testcase_04 AC 76 ms
71,040 KB
testcase_05 AC 219 ms
241,200 KB
testcase_06 AC 77 ms
71,292 KB
testcase_07 AC 78 ms
70,800 KB
testcase_08 AC 78 ms
71,352 KB
testcase_09 AC 78 ms
71,344 KB
testcase_10 AC 78 ms
70,960 KB
testcase_11 AC 75 ms
71,144 KB
testcase_12 AC 77 ms
70,944 KB
testcase_13 AC 78 ms
71,052 KB
testcase_14 AC 78 ms
71,348 KB
testcase_15 AC 78 ms
71,236 KB
testcase_16 AC 77 ms
71,380 KB
testcase_17 AC 76 ms
71,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,z=map(int,input().split())
S=set()
for x in range(1,z):
    S.add(pow(x,n))
for x in range(1,z):
    if pow(z,n)-pow(x,n) in S:
        print("Yes")
        exit()
print("No")
0