結果
問題 |
No.1218 Something Like a Theorem
|
ユーザー |
![]() |
提出日時 | 2021-11-18 21:28:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 346 ms / 2,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 81,708 KB |
実行使用メモリ | 224,384 KB |
最終ジャッジ日時 | 2024-12-27 17:26:30 |
合計ジャッジ時間 | 3,956 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
def main(): from sys import stdin readline=stdin.readline n,z = map(int, readline().split()) if n >= 3: print('No') elif n == 1: if z >= 2: print('Yes') else: print('No') elif n == 2: st = set(y*y for y in range(1, 10**6+1)) z *= z for x in range(1, 10**6+1): x *= x if z-x in st: print('Yes') break else: print('No') main()