結果

問題 No.1218 Something Like a Theorem
ユーザー O2MT
提出日時 2020-09-05 00:19:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 82,268 KB
実行使用メモリ 76,188 KB
最終ジャッジ日時 2024-11-26 21:14:49
合計ジャッジ時間 1,817 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt
def calc(num,n):
  for i in range(n):
    num = sqrt(num)
  return num

n,Z = map(int,input().split())
ans = "No"
for i in range(1,Z):
  yn = Z**n - i**n
  c = calc(yn,n)
  if c == int(c):
    ans = "Yes"
print(ans)
0