結果

問題 No.1218 Something Like a Theorem
ユーザー marroncastlemarroncastle
提出日時 2020-09-04 21:27:21
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 75,904 KB
最終ジャッジ日時 2023-08-17 14:54:26
合計ジャッジ時間 2,572 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,128 KB
testcase_01 AC 73 ms
75,524 KB
testcase_02 AC 71 ms
71,200 KB
testcase_03 AC 73 ms
71,444 KB
testcase_04 AC 72 ms
71,224 KB
testcase_05 AC 72 ms
71,244 KB
testcase_06 AC 71 ms
70,948 KB
testcase_07 AC 81 ms
75,584 KB
testcase_08 AC 83 ms
75,680 KB
testcase_09 AC 97 ms
75,904 KB
testcase_10 AC 77 ms
75,488 KB
testcase_11 AC 71 ms
71,312 KB
testcase_12 AC 70 ms
71,316 KB
testcase_13 AC 71 ms
71,396 KB
testcase_14 AC 71 ms
70,952 KB
testcase_15 AC 70 ms
71,448 KB
testcase_16 AC 70 ms
71,196 KB
testcase_17 AC 70 ms
71,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
  ans = 0
  n, z = map(int, input().split())
  if n==1:
    if z>1:
      return 'Yes'
    return 'No'
  for x in range(1,z+1):
    for y in range(1,z+1):
      if x**n+y**n == z**n:
        return 'Yes'
  return 'No'
print(solve())
0