考拉兹猜想,是指对于每一个正整数,如果它是奇数,则对它乘3再加1,如果它是偶数,则对它除以2,如此循环,最终都能够得到1。
如n = 6,根据上述数式,得出 6→3→10→5→16→8→4→2→1 。步骤中最高的数是16,共有8个步骤。现在给定任意整数a和b,问对所有a <= n <= b,一共经过多少步后才能都得到1,其中最高的数是多少。
Sample Input #1 6 6 Sample Input #2 11 12 Sample Input #3 23 33
Sample Output #1 8 16 Sample Output #2 23 52 Sample Output #3 360 9232