結果

問題 No.1218 Something Like a Theorem
ユーザー umashi-pan-tnokk093numashi-pan-tnokk093n
提出日時 2020-09-04 21:55:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 200 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 81,992 KB
実行使用メモリ 62,092 KB
最終ジャッジ日時 2024-05-04 22:14:43
合計ジャッジ時間 1,468 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,252 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 34 ms
52,340 KB
testcase_04 AC 36 ms
53,856 KB
testcase_05 AC 44 ms
60,232 KB
testcase_06 WA -
testcase_07 AC 49 ms
61,280 KB
testcase_08 AC 46 ms
60,952 KB
testcase_09 WA -
testcase_10 AC 41 ms
62,092 KB
testcase_11 WA -
testcase_12 AC 36 ms
52,580 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

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 (x**n+y**n)==z**n:
            ans+=1
            break
if ans:
    print('Yes')
else:
    print('No')
0