Collatz in the Range

Problem #297

Tags: unlabeled

Who solved this?

No translations... yet

Let's recollect the problem of Collatz Sequence - it is very easy to code until we got to large enough numbers...

Now we are given an integer range, denoted by start and end (two numbers). Please find a number in this range, which gives the longest Collatz Sequence. Tell just the length of this maximal sequence.

Range is roughly between 10 and 20 million values. The result should be found fast, time limit is about 90 seconds. Please reload the page to get the new input before running your calculations.

Input data: are just start and end of the interval (both somewhere between 2 and 3 billions).

Answer: single value, the length of maximal sequence.

Example:

input data:
1492 2018

answer:
179
You need to login to get test data and submit solution.