結果

問題 No.1218 Something Like a Theorem
ユーザー NoaSaberNoaSaber
提出日時 2021-04-30 23:49:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 1,454 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 76,108 KB
最終ジャッジ日時 2023-09-26 08:57:54
合計ジャッジ時間 3,142 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,296 KB
testcase_01 AC 79 ms
75,996 KB
testcase_02 AC 69 ms
71,268 KB
testcase_03 AC 69 ms
71,072 KB
testcase_04 AC 71 ms
71,088 KB
testcase_05 AC 71 ms
71,272 KB
testcase_06 AC 71 ms
71,068 KB
testcase_07 AC 80 ms
76,012 KB
testcase_08 AC 79 ms
76,108 KB
testcase_09 AC 81 ms
76,008 KB
testcase_10 AC 77 ms
75,764 KB
testcase_11 AC 72 ms
71,000 KB
testcase_12 AC 71 ms
71,008 KB
testcase_13 AC 74 ms
71,036 KB
testcase_14 AC 74 ms
71,188 KB
testcase_15 AC 75 ms
71,476 KB
testcase_16 AC 75 ms
71,128 KB
testcase_17 AC 75 ms
71,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Z=map(int,input().split())
if N==1 and 2<=Z:
    print("Yes")
    exit()
for x in range(1,1001):
    for y in range(1,1001):
        if x**N+y**N==Z**N:
            print("Yes")
            exit()
        if x**N+y**N>Z**N:
            break
print("No")
0