結果
| 問題 | No.955 ax^2+bx+c=0 |
| コンテスト | |
| ユーザー |
kagasan
|
| 提出日時 | 2020-04-26 12:47:30 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 437 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 13,696 KB |
| 最終ジャッジ日時 | 2026-09-25 01:51:17 |
| 合計ジャッジ時間 | 8,255 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 WA * 33 RE * 43 |
ソースコード
import math
a,b,c = map(int,input().split())
if a == 0 and b == 0 and c == 0:
print(-1)
elif b * b - 4 * a * c < 0:
print(0)
elif b * b - 4 * a * c == 0:
print(1)
print(-b/(2.0 * a))
else:
d = math.sqrt(1000000000000000000000000000000 * (b * b - 4 * a * c))
e = -b * 1000000000000000
f = 2 * a * 1000000000000000
print(2)
print('{:.20g}'.format((e - d) / f))
print('{:.20g}'.format((e + d) / f))
kagasan