結果

問題 No.1218 Something Like a Theorem
ユーザー umashi-pan-tnokk093numashi-pan-tnokk093n
提出日時 2020-09-04 21:58:39
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 76,216 KB
最終ジャッジ日時 2023-08-17 15:36:01
合計ジャッジ時間 2,515 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,016 KB
testcase_01 AC 72 ms
75,516 KB
testcase_02 AC 68 ms
71,228 KB
testcase_03 AC 70 ms
71,156 KB
testcase_04 AC 68 ms
71,076 KB
testcase_05 AC 82 ms
76,004 KB
testcase_06 AC 69 ms
70,840 KB
testcase_07 AC 80 ms
76,008 KB
testcase_08 AC 79 ms
76,168 KB
testcase_09 AC 76 ms
76,116 KB
testcase_10 AC 80 ms
76,216 KB
testcase_11 AC 68 ms
71,168 KB
testcase_12 AC 69 ms
70,956 KB
testcase_13 AC 68 ms
71,092 KB
testcase_14 AC 69 ms
70,960 KB
testcase_15 AC 69 ms
71,016 KB
testcase_16 AC 72 ms
71,156 KB
testcase_17 AC 68 ms
70,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,z=map(int,input().split())
ans=0
for x in range(1,z+1):
    for y in range(z-x,z+1):
        if y!=0 and (x**n+y**n)==z**n:
            ans+=1
            break
if ans:
    print('Yes')
else:
    print('No')
0