I found a soln. for 253B - Physics Practical which is 2726248 during the contest-it got error for test 14. But on my computer, when I tested the program for test 14 (given there), the answer was correct (the answer was also provided). In custom test, it gave wrong answer, but on my computer it gave correct answer. Why so?
Because you use floating point numbers in the situation where integer calculations are enough.
Floating point number should be compared using some EPS. For example: To check if a < b you should write a + EPS < b. To check if a <= b you should write a <= b + EPS.
Thank you