結果
| 問題 | No.1218 Something Like a Theorem |
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2020-09-04 21:35:54 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 297 bytes |
| 記録 | |
| コンパイル時間 | 1,426 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 961,144 KB |
| 最終ジャッジ日時 | 2026-05-20 22:22:43 |
| 合計ジャッジ時間 | 5,857 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | WA * 3 MLE * 1 -- * 12 |
ソースコード
from math import sqrt
n,z=map(int,input().split())
if n>=3:
print("No")
exit()
elif n==1 and z==1:
print("No")
elif n==1 and z>=2:
print("Yes")
X=[]
x=1
while x*x<z*z:
X.append(x*x)
x+=1
D=[a+b for a in X for b in X]
if z*z in D:
print("Yes")
else:
print("No")
Kazun