My solution passed the pretests but failed on a TC in system testing. In the failed TC, I was printing the square root of a perfect square and it was printed as 1e9 instead of 1000000000.
The square root function was not printing in scientific notation for smaller numbers, but it did for sqrt(1e18) i.e. 1e9. Does anyone know why this happened?