結果

問題 No.1218 Something Like a Theorem
ユーザー MottchanMottchan
提出日時 2023-03-26 19:38:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 81,864 KB
実行使用メモリ 75,340 KB
最終ジャッジ日時 2023-10-19 13:49:39
合計ジャッジ時間 2,850 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
59,696 KB
testcase_01 AC 48 ms
61,784 KB
testcase_02 AC 44 ms
59,632 KB
testcase_03 AC 40 ms
59,632 KB
testcase_04 AC 48 ms
61,716 KB
testcase_05 WA -
testcase_06 AC 42 ms
59,696 KB
testcase_07 AC 54 ms
66,040 KB
testcase_08 AC 57 ms
66,040 KB
testcase_09 AC 52 ms
63,844 KB
testcase_10 AC 55 ms
63,980 KB
testcase_11 AC 41 ms
59,696 KB
testcase_12 AC 41 ms
59,696 KB
testcase_13 AC 41 ms
59,696 KB
testcase_14 AC 70 ms
75,252 KB
testcase_15 AC 89 ms
75,124 KB
testcase_16 AC 92 ms
75,124 KB
testcase_17 AC 102 ms
75,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,z=map(int,input().split())
a=0
for x in range(1,10**4):
    for y in range(x,10**4):
        if x ** n + y ** n == z ** n:
            a+=1
            break        
        elif x ** n + y ** n > z ** n:
            break

if a > 0:
    print('Yes')
else:
    print('No')
0