結果

問題 No.1218 Something Like a Theorem
ユーザー O2MTO2MT
提出日時 2020-09-05 00:19:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 76,160 KB
最終ジャッジ日時 2024-05-05 03:50:46
合計ジャッジ時間 1,645 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,096 KB
testcase_01 AC 36 ms
51,712 KB
testcase_02 AC 36 ms
51,712 KB
testcase_03 AC 36 ms
51,840 KB
testcase_04 AC 36 ms
52,096 KB
testcase_05 AC 126 ms
76,160 KB
testcase_06 AC 36 ms
52,096 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 45 ms
58,368 KB
testcase_10 WA -
testcase_11 AC 36 ms
51,968 KB
testcase_12 WA -
testcase_13 AC 36 ms
51,840 KB
testcase_14 AC 36 ms
52,096 KB
testcase_15 AC 36 ms
51,840 KB
testcase_16 AC 36 ms
51,968 KB
testcase_17 AC 37 ms
51,712 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