while True:try:A=int(input())B=int(input())C=int(input())q1=input()q2=input()q3=input()if q1==1:a=Aif q2==1:b=Belse:b=(0-B)if q3==1:c=Celse:c=(0-C)else:a=(0-A)if q2==1:b=Belse:b=(0-B)if q3==1:c=Celse:c=(0-C)D=(b**2)-(4*a*b)sum1=(-b+(D**0.5))/(2*a)sum2=(-b-(D**0.5))/(2*a)if D<0:print("No real root")elif D==0:print(f"Two same roots x={sum1}")else:print(f"Two different roots x1={sum1} , x2={sum2}")except:break
題目要求輸入用同一行
你這樣每輸入一個測資都是不同行
你可以用這個看看
a,b,c=map(int,input().split())