[Community Puzzle] 2nd degree polynomial - simple analysis

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Nowan,validated by @FredericLocquet,@LantarSidonis and @Westicles.
If you have any issues, feel free to ping them.

Continuing the discussion from [Community Puzzle] 2nd degree polynomial - simple analysis:

Is test case “parabole on the right, 2 intersection” bugged ? it never pass but after all test I do, i never get a bad answer on this case.

I’m not sure what you mean by this.
The test case is correct.
For 1x^2-2x+1=0 the answer is (0,1),(1,0)

If you mean that the test fails after submitting then the reason is that submit validators are different from visible test cases to prevent hardcoded solutions and there must be a bug in your code.

I tested with about 8 or 9 other paraboles that have the same properties and it always give me the right answer, the first point is (0,c) because the equation in evaluated in 0 is the parameter c and -b/2a which is the extremum of the fonction according to the derivative of a 2nd degree polynomial expression, if there is 2 intersections between the axis and the parabole, there must be them.

problem solved i’m just stupid and forgot to print the ontput on the same line

1 Like

I forgot to add a test case with 2 roots one of which is (0, 0).
Indeed, I noticed some player solutions that doesn’t check duplicates