I’m at 100% IDE and stuck at the last validation case “many random cases”. I haven’t seen the pre-approved puzzle so no idea what’s in that test case. Any idea what I might have missed?
SOLVED: I forgot to check for the case where x / x = 1, that should be added to the test cases.
I am stuck at this question, I wrote 2 applications of a method I use (one is faster and the other is more careful about memory) and both of them fails the first test in validation. the faster one also fails the 3rd test . I am quite sure that overflow should not be an issue ( I don’t even make any sums) , I do handle signs and everything I can think of.
Thanks for the update to the puzzle. I saw the problem instantly once I got the output from that new test case. I completely forgot to add a test for signs on non-mixed numbers with both negative numerator and denominator. Quick and easy fix.
Hi there. I have almost completed the problem, but I am stacked when submitting the problem. I have passed all test cases of the problem (open ones, not submitted ones), but on Submission, I can not pass the firs one (Both integer and fractional parts).
I guess I am overlooking something, does any one have a clue on what could be happening?
The “Many random cases” validator when the solution is submitted fails.
The test cases do not cover time execution issues. If your algorithms are not efficient they will not pass the validators. The test cases must add a long execution test case that will fail for not optimal algorithms.
The solution passed the provided test cases and also some customized test cases with very big prime numbers (to exclude this as a reason as was not covered in the test cases). The solution is general, so, I had no idea what case is not covered. Part of creating a puzzle is to be sure that the test cases are well selected and validators are double checked against correct answers and corresponding test cases. Not offering any indication why a validators fail makes the code difficult to debug. I guess the efficiency was an isssue and improved the speed, which worked.