結果

問題 No.1179 Quadratic Equation
ユーザー qumazaki
提出日時 2020-09-03 00:23:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,352 KB
実行使用メモリ 53,964 KB
最終ジャッジ日時 2024-11-22 03:04:21
合計ジャッジ時間 1,301 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c = map(int,input().split())

inroot = b**2-4*a*c
if(inroot < 0):
    print('imaginary')
elif(inroot==0):
    print(-b/(2*a))
else:
    ans = [0]*2
    ans[0] = (-b+inroot**0.5)/(2*a)
    ans[1] = (-b-inroot**0.5)/(2*a)
    ans.sort()
    print(' '.join(map(str,ans)))
0