I\'m solving Uva\'s 3n+1 problem and I don\'t get why the judge is rejecting my answer. The time limit hasn\'t been exceeded and the all test cases I\'ve tried have run corr
Are you making sure to accept the entire input? It looks like your program terminates after reading only one line, and then processing one line. You need to be able to accept the entire sample input at once.