100

The 3n + 1 problem
Type:
General
Diff:2.0

Tricks

Read the problem statement carefully. Here you are given one pair of integer per line and your task is to determine the maximum cycle length over the entire integer between and including i and j. But nowhere is stated that from i to j.  So the following input gives the same result: 

Input 
1 10 
10 1

Output 
1 10 20 
10 1 20

Oooooo..... , here you have to maintain another thing. You have to output the i and j as they appear in the input.

Related Problems & Topics

694 The Collatz Sequence   

If you have any advice, complements 

or proposal, please  Send mail to Author

Submit

 

1