結果

問題 No.1179 Quadratic Equation
ユーザー roarisroaris
提出日時 2020-08-21 22:25:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 81,968 KB
実行使用メモリ 55,236 KB
最終ジャッジ日時 2024-04-23 06:07:22
合計ジャッジ時間 1,339 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
54,128 KB
testcase_01 AC 41 ms
54,584 KB
testcase_02 AC 38 ms
53,416 KB
testcase_03 AC 37 ms
54,116 KB
testcase_04 AC 37 ms
53,668 KB
testcase_05 AC 39 ms
55,176 KB
testcase_06 AC 38 ms
54,268 KB
testcase_07 AC 39 ms
54,340 KB
testcase_08 AC 39 ms
53,668 KB
testcase_09 AC 40 ms
54,196 KB
testcase_10 WA -
testcase_11 AC 39 ms
54,896 KB
testcase_12 AC 39 ms
55,236 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

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

if b*b-4*a*c<0:
    print('imaginary')
else:
    if b*b-4*a*c==0:
        print(-b/2/a)
    else:
        d = (b*b-4*a*c)**0.5
        print((-b-d)/2/a, (-b+d)/2/a)
0