[Community Puzzle] Euclid's algorithm with complex numbers

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Rafarafa,validated by @Edjy,@Diabetos and @DeanTheMachine.
If you have any issues, feel free to ping them.

Does anybody know why test 5 in validator fails?

Does everything else pass, validators and tests ?
If so, the reason probably is because you have useless parenthesis on the line before the last, you should print “2j = …” and you print (or so I think) “(2j) = …” or “(0+2j) = …”, the issue should not appear if you use complex from python, but if you programmed it yourself or used another language it can be not shown as expected. That is the only thing I could see specific to the validator 5.

I don’t think there is any error about parenthesis.

Well if you don’t explain what you’ve done I’m not sure I can’t be of any more help to you,
here are the validators entries so you can look up what’s wrong.

Spoiler

32 733
-351 -455

What are the expected results?

Expected result
(32+733j) = (-351-455j) * (-1-1j) + (136-73j)
(-351-455j) = (136-73j) * (-1-4j) + (77+16j)
(136-73j) = (77+16j) * (2-1j) + (-34-28j)
(77+16j) = (-34-28j) * (-2+1j) + (-19-6j)
(-34-28j) = (-19-6j) * (2+1j) + (-2+3j)
(-19-6j) = (-2+3j) * (2+5j) + -2j
(-2+3j) = -2j * (-1-1j) + 1j
-2j = 1j * (-2+0j) + 0j
GCD((32+733j), (-351-455j)) = 1j