因为你format()之后,把两个解转换成了字符串了,字符串"-2.00"是比”-1.00”大的
a,b,c=map(float,input().split()) f=b**2-4*a*c if f>=0 : x1=(-b+f**0.5)/(2*a) x2=(-b-f**0.5)/(2*a) print('{:.2f} {:.2f}'.format(x1,x2)) else: print('No')
觉得有用的话采纳一下哈