結果
| 問題 | No.1218 Something Like a Theorem |
| コンテスト | |
| ユーザー |
anagohirame
|
| 提出日時 | 2020-07-16 04:17:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-17 15:51:51 |
| 合計ジャッジ時間 | 1,774 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 16 |
ソースコード
n, z = map(int, input().split()) if n > 2: print(-1) elif n == 1: if z == 1: print(-1) else: print(1, z-1) else: ok = False for x in range(1, 1001): for y in range(x, 1001): if x*x + y*y == z*z: print(x, y) ok = True break if ok: break if not ok: print(-1)
anagohirame