Consider the 3n + 1 problem as posted at the programming challenges website. This is an easy problem to program a correct answer to, it is fitting that we only have one week for it.
All input is to be taken from System.in. If you need, you may use the "How to submit in JAVA" template from the programming challenges website.
Note: both the input and output format are precisely specified for the problem. If you assume a different input format, your program may or may not work correctly. If you give a different output, your solution will be rejected.
You should try to make your program run as fast as possible. If anybody has a program which runs no more than twice as slow as my program, they will get extra credit.
Note, the Programming Challenges website incorrectly grades this problem! So, if you want to check if your answer is correct or not, you cannot do so on this website, which will incorrectly grade correct Java submissions for this problem as incorrect (and incorrectly grade some incorrect C submissions as correct!). (If you want, you can get a proper grader for the problem at the UVa judge, linked to at the Programming Challenges home page.)