結果
問題 |
No.955 ax^2+bx+c=0
|
ユーザー |
![]() |
提出日時 | 2020-04-26 12:47:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 437 bytes |
コンパイル時間 | 317 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-16 22:24:50 |
合計ジャッジ時間 | 6,581 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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))