結果
| 問題 |
No.955 ax^2+bx+c=0
|
| コンテスト | |
| ユーザー |
emthrm
|
| 提出日時 | 2019-12-18 03:24:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 432 bytes |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 81,836 KB |
| 実行使用メモリ | 67,600 KB |
| 最終ジャッジ日時 | 2024-07-07 00:22:33 |
| 合計ジャッジ時間 | 6,999 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 82 WA * 13 RE * 27 |
ソースコード
a, b, c = [int(i) for i in input().split()]
if a == 0:
if b == 0:
print(-1)
else:
print(1)
print(-c / b)
else:
d = b * b - a * c * 4
if d == 0:
print(1)
print(-b / (2 * a))
elif d > 0:
print(2)
d **= 0.5
ans1 = 2 * c / (-b + d)
ans2 = 2 * c / (-b - d)
print(min(ans1, ans2))
print(max(ans1, ans2))
else:
print(0)
emthrm