Question_error concept

In the question tagged “QUADROOT” of beginner level programming, it is not clearly mentioned, whether the output should be in integer or a float. Because suppose the roots of the quadratic equation is fractional, then
int datatype won’t work, and if I use float datatype, then the test case example provided in the question will print 5.0000000 and 3.00000000, instead of 5 and 3.

Please see if the question needs editing or something in my concept is wrong.

The success criterion in that problem is that the difference between the answer you provide and the exact value is less than 10^{-6} - accurate to the sixth decimal place. And that is correct in the given case, as it also would be with your versions of the same numbers.

But in general, yes, you will need to find the roots as float values. And output with at least enough precision to meet the accuracy requirement.

I’d also note that the problem doesn’t say anywhere that the given coefficients A, B, C are integers, either. Although looking through the successful submissions, I’d guess that in fact the test cases do all have integer coefficients.

Edit to add: I checked your code - your formula is wrong also, so even if all the expected answers were integers, you would still get WA.