結果
問題 | No.1179 Quadratic Equation |
ユーザー | Navier_Boltzmann |
提出日時 | 2023-11-12 07:01:26 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 53 ms / 2,000 ms |
コード長 | 356 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 55,808 KB |
最終ジャッジ日時 | 2024-09-26 03:00:43 |
合計ジャッジ時間 | 1,516 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
from heapq import * from itertools import * from functools import * from collections import * import sys,math input = sys.stdin.readline a,b,c = map(int,input().split()) D = b**2 - 4*a*c if D < 0: print('imaginary') elif D==0: print((-b)/(2*a)) else: X = (-b + math.sqrt(D))/(2*a) Y = (-b - math.sqrt(D))/(2*a) print(min(X,Y),max(X,Y))