Ad
  • Custom User Avatar

    I have same issue. Don't know why. For x=8 and given m=11110584286373380831 and n=908 number of combinations according to the formula is comb_num=11110584286373380096.0. Which is not equal (comb_num != m). Same for other x in range(n+1). Getting x=-1 when it is said that right answer is x=8. Using Python.
    Guess it's because of precision issues.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I have this problem. The ones that work are passing, but the ones that should be impossible are producing a string.
    I've already forfeited and looked at the solutions as I was spending way too long on this, but I can't for the life of me figure out why what I
    did doesn't work even though it's extremely similar to the solution listed first.

  • Custom User Avatar

    Because you need to follow the steps, first get the smallest i, and then the smallest j.

    Testing(209917, [29917, 0, 1]); 
                            ^
                          smallest i, 1 > 0, so [29917, 1, 0] is not valid
    

    This is explained in the description, read it again.

    testing(269045, [26945, 3, 0])
    

    In that other case, to get the smallest number you can get moving only one digit, your only choice is to move the 0 to the front.