結果

問題 No.1218 Something Like a Theorem
ユーザー nohakai3nohakai3
提出日時 2022-11-18 09:27:27
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 271 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 81,740 KB
実行使用メモリ 75,592 KB
最終ジャッジ日時 2023-10-19 21:57:17
合計ジャッジ時間 8,574 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
59,480 KB
testcase_01 AC 49 ms
59,704 KB
testcase_02 AC 39 ms
53,352 KB
testcase_03 AC 39 ms
53,352 KB
testcase_04 AC 39 ms
53,352 KB
testcase_05 AC 39 ms
53,352 KB
testcase_06 AC 47 ms
59,704 KB
testcase_07 AC 44 ms
59,704 KB
testcase_08 AC 45 ms
59,704 KB
testcase_09 AC 46 ms
59,704 KB
testcase_10 AC 43 ms
59,480 KB
testcase_11 AC 46 ms
59,704 KB
testcase_12 AC 42 ms
59,480 KB
testcase_13 AC 48 ms
59,704 KB
testcase_14 AC 49 ms
59,704 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 i**n+j**n==c:
                print("Yes")
                exit()
    print("No")
0