結果
問題 |
No.1179 Quadratic Equation
|
ユーザー |
![]() |
提出日時 | 2020-08-21 22:07:37 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 495 bytes |
コンパイル時間 | 187 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 52,736 KB |
最終ジャッジ日時 | 2024-10-15 05:40:56 |
合計ジャッジ時間 | 1,268 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 2 |
ソースコード
import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 a,b,c=MI() D=b*b - 4*a*c if D < 0: print("imaginary") elif D==0: print(-1*b/(2*a)) else: ans=[] ans.append((-b-D**0.5)/(2*a)) ans.append((-b+D**0.5)/(2*a)) print(' '.join(map(str, ans))) main()