結果

問題 No.1218 Something Like a Theorem
ユーザー rythem00359rythem00359
提出日時 2020-09-17 16:54:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 527 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 7,948 KB
最終ジャッジ日時 2023-09-04 07:20:39
合計ジャッジ時間 2,350 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,836 KB
testcase_01 AC 15 ms
7,812 KB
testcase_02 WA -
testcase_03 AC 15 ms
7,840 KB
testcase_04 AC 15 ms
7,804 KB
testcase_05 AC 15 ms
7,844 KB
testcase_06 AC 15 ms
7,788 KB
testcase_07 AC 15 ms
7,844 KB
testcase_08 AC 16 ms
7,948 KB
testcase_09 AC 74 ms
7,864 KB
testcase_10 AC 16 ms
7,824 KB
testcase_11 AC 16 ms
7,828 KB
testcase_12 AC 16 ms
7,804 KB
testcase_13 AC 16 ms
7,788 KB
testcase_14 AC 16 ms
7,892 KB
testcase_15 AC 15 ms
7,808 KB
testcase_16 AC 16 ms
7,880 KB
testcase_17 AC 15 ms
7,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,z=map(int,input().split())
def func():
    for i in range(2,z):
        for j in range(1,i):
            if i**2+j**2==z:return 'Yes'
    return 'No'
if n==1:print('Yes')
elif n==2:print(func())
else:print('No')
0