Expand the polynomial



I need help for https://www.codingame.com/ide/puzzle/expand-the-polynomial .
My code in java is ko on tests 5 and 6 of the validator.

What is different from the IDE?

Thanks for your help.

Expand the polynomial - Error on Test 5 - Bigger degree after submission

Hi there,

I’m stuck on this puzzle:

All my unit tests are ok but when I submit, the test 5 is KO.
I think it’s coming from parsing, but as we can’t see the post submission tests I can’t guess the source of the problem. So it’s impossible for me to fix it.

Any suggestion on extra edge-test input will be greatly appreciated!



any help from the author @nicola1, or the moderators who accepted it @algmyr @CyberLemonade @Wladek?



The community helped me.
A bug in my code, did not pass the test 5 and 6 of the validator
but was not detected by the test set.

Test 7 has been added
and the test 5 has been corrected to correspond to the validators test 5.


seems the test 5 is still an issue though. @Stilgart I see you updated it recently but @BFighter4935 encountered an issue.


Looking at the contribution in question https://www.codingame.com/contribute/view/108748007bdddd5e71e272a9c8cb67145bda cases 5 and 6 look fine to me. WolframAlpha also confirms that the polynomials are equal. Or was there some issue that has now been fixed?


I solved my parsing issue thank to the validator provided in the contribution page.

Thanks alot