3n+1 challenge at UVa
问题 I'm having trouble running the "3n+1 Problem" from the "Programming Challenges" book. I've tried every solution in Java I could find on google (even the ones on Stack Overflow), and not a single one works, they all report a "Wrong answer". I also found a working C++ solution, translated it to Java, and same thing: "Wrong answer". I'm using the template from Programming Challenges for Java submissions, and I could swear my algorithm is right, the only possible problem I can think of is in the