結果

問題 No.1218 Something Like a Theorem
ユーザー O2MTO2MT
提出日時 2020-09-05 00:19:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 77,244 KB
最終ジャッジ日時 2023-08-17 20:59:07
合計ジャッジ時間 2,843 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,488 KB
testcase_01 AC 76 ms
71,488 KB
testcase_02 AC 74 ms
71,380 KB
testcase_03 AC 78 ms
71,464 KB
testcase_04 AC 75 ms
71,576 KB
testcase_05 AC 183 ms
77,244 KB
testcase_06 AC 75 ms
71,268 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 77 ms
75,492 KB
testcase_10 WA -
testcase_11 AC 74 ms
71,220 KB
testcase_12 WA -
testcase_13 AC 73 ms
71,356 KB
testcase_14 AC 73 ms
71,180 KB
testcase_15 AC 74 ms
71,436 KB
testcase_16 AC 74 ms
71,520 KB
testcase_17 AC 74 ms
71,392 KB
権限があれば一括ダウンロードができます

ソースコード

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