結果
問題 | No.1179 Quadratic Equation |
ユーザー |
![]() |
提出日時 | 2021-11-18 01:07:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 2,000 ms |
コード長 | 256 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-12-24 10:32:12 |
合計ジャッジ時間 | 1,484 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
a, b, c = map(int, input().split())import mathD = b**2-4*a*cif a < 0:a, b, c = -a, -b, -cif D < 0:print('imaginary')elif D == 0:print((-b)/(2*a))else:x1 = (-b-math.sqrt(D))/(2*a)x2 = (-b+math.sqrt(D))/(2*a)print(x1, x2)