Hailstorm Numbers


n = int(input()) t = 1 lon = [n] while (n != 1): if (n % 2 == 0): n = n / 2 else: n = 3 * n + 1 lon.append(int(n)) t = t + 1 ln = max (lon) print (str(t) + "," + str(ln), end = "")

Loading Please Wait...