• + 0 comments

    The problem can be solved in O(1) If f(t) == 1, t = sum of geometric progression an = 3*2(n-1) . So we can find the next t where f(t) == 1