結果

問題 No.1218 Something Like a Theorem
ユーザー nohakai3
提出日時 2022-11-18 09:30:47
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 279 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 82,040 KB
実行使用メモリ 75,904 KB
最終ジャッジ日時 2024-09-19 17:57:59
合計ジャッジ時間 8,074 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 TLE * 3
権限があれば一括ダウンロードができます

ソースコード

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