結果
問題 | No.1218 Something Like a Theorem |
ユーザー |
![]() |
提出日時 | 2020-09-04 21:26:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 47 ms / 2,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 256 ms |
コンパイル使用メモリ | 82,352 KB |
実行使用メモリ | 60,416 KB |
最終ジャッジ日時 | 2024-11-26 11:48:08 |
合計ジャッジ時間 | 1,682 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
n,z = map(int,input().split())if n >= 3:print("No")elif n == 1:if z >= 2:print("Yes")else:print("No")else:ans = 0for x in range(1,1001):for y in range(1,1001):if x**2 + y**2 == z**2:ans = 1breakprint(["No","Yes"][ans])