Send your feedback or ask for help here!
Is there some kind of trick to figuring out if something will end up looping? Because I don’t get how to solve this without some brute forcing. I get that you should keep track of the answers from the previous pairs, but on the larger number sets I get stack overflow error.
Yes, there is definitely a trick
Some of the testcases involve huge numbers and the length of the loop can be quite large so I don’t think a simple simulation could work here. This puzzle is more math than coding.
Try to figure out what specific property a and b have if they result halt. The example in the description and the other IDE test cases help a lot!