結果

問題 No.1218 Something Like a Theorem
ユーザー nohakai3nohakai3
提出日時 2022-11-18 09:28:34
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 279 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 81,732 KB
実行使用メモリ 75,672 KB
最終ジャッジ日時 2023-10-19 21:57:59
合計ジャッジ時間 8,698 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
59,476 KB
testcase_01 AC 48 ms
59,708 KB
testcase_02 AC 38 ms
53,364 KB
testcase_03 AC 38 ms
53,364 KB
testcase_04 AC 38 ms
53,364 KB
testcase_05 AC 39 ms
53,364 KB
testcase_06 AC 47 ms
59,708 KB
testcase_07 AC 44 ms
59,708 KB
testcase_08 AC 45 ms
59,708 KB
testcase_09 AC 48 ms
59,708 KB
testcase_10 AC 43 ms
59,476 KB
testcase_11 AC 48 ms
59,708 KB
testcase_12 AC 43 ms
59,476 KB
testcase_13 AC 47 ms
59,708 KB
testcase_14 AC 48 ms
59,708 KB
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
権限があれば一括ダウンロードができます

ソースコード

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,1001):
        for j in range(1,1001):
            if pow(i,n)+pow(j,n)==c:
                print("Yes")
                exit()
    print("No")
0