Ad
  • Custom User Avatar

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

  • Default User Avatar

    Something broke in random Ruby tests. Some tests say that I have wrong answers, but when I check them through puts, it gives the correct values, those - my solution returns the correct answers, but the tests perceive them with different values

    For example

    def champernowe_digit(n)

    ...

    p res #=> 6

    res

    end

    #=> Random digit tested: 8563414405108046 - Expected: 6, instead got: 5

  • Custom User Avatar

    Can one get it to run in constant time?

    Everybody is doing it in O(log n), which is plenty good enough really.