結果

問題 No.1218 Something Like a Theorem
ユーザー naru_1017
提出日時 2020-09-04 22:37:30
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 291 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-26 15:55:18
合計ジャッジ時間 2,907 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
#sys.setrecursionlimit(10**6)

from string import ascii_lowercase

n,z=map(int,input().split())
r=range(1,1001)
ans=z**n
if n>=3:
    print("No")
    exit()
for x in r:
    for y in r:
        if x**n+y**n==ans:
            print("Yes")
            exit()
0