結果

問題 No.1218 Something Like a Theorem
ユーザー nohakai3nohakai3
提出日時 2022-11-18 09:30:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 277 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 81,728 KB
実行使用メモリ 75,516 KB
最終ジャッジ日時 2023-10-19 21:58:37
合計ジャッジ時間 3,563 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,448 KB
testcase_01 AC 44 ms
59,800 KB
testcase_02 AC 37 ms
53,448 KB
testcase_03 AC 39 ms
53,448 KB
testcase_04 AC 38 ms
53,448 KB
testcase_05 AC 39 ms
53,448 KB
testcase_06 AC 44 ms
59,800 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 46 ms
59,800 KB
testcase_10 WA -
testcase_11 AC 45 ms
59,800 KB
testcase_12 AC 44 ms
59,568 KB
testcase_13 AC 46 ms
59,800 KB
testcase_14 AC 46 ms
59,800 KB
testcase_15 AC 601 ms
75,516 KB
testcase_16 AC 641 ms
75,476 KB
testcase_17 AC 685 ms
75,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,z=map(int,input().split())
c=z**n
if n==1:
    if z==1:
        print("No")
    else:
        print("Yes")
else:
    for i in range(1,500):
        for j in range(1,500):
            if pow(i,n)+pow(j,n)==c:
                print("Yes")
                exit()
    print("No")
0