#!/usr/bin/python3
# -*- coding:utf-8 -*-
# @FileName :20210430_01.py
# @Time :2021/4/30 10:56
# @Author :Storm_duke
"""
二元一次方程求根公式
"""
import math
def getroot(a, b, c):
assert a != 0, u"不能为0"
try:
t1 = math.sqrt(math.pow(b, 2) - 4*a*c)
except ValueError:
return u"无解"
return round((-b + t1) / 2*a, 2)
if __name__ == "__main__":
a1, b1, c1 = map(eval, input("请输入二元一次方程系数('3','4','5'):").split(","))
print("其中一个解是:{}".format(getroot(a1, b1, c1)))