TETRA : Wrong Answer

please help…i’m getting wrong answer. i don’t know wats wrong with the code . Here is the link to my solution

Click here


2nd soln still getting WA

Click here

The most possible reason can be integer overflow error… in line


Maximum edge length is 1000 and 4 * A * A * B * B * C * C can result in (10^18 * 4) which may result in integer overflow…

I am using float data type, so there shouldn’t be any overflow error.
My solution and solution submitted in this link are nearly same…but this solution has been accpted. HOW??

The 1st diff(2nd soln and the soln you are comparing to) that i can see is the o/p format…urs is “4lf" and the others is ".4lf”…the 2nd format states that print the number with precision of 4 decimal places…while the 1st says that print a floating pt number with width 4!!!

corrected it …but still getting wa :frowning: