Ad
  • Custom User Avatar

    I think you misunderstood the problem. The one asked isn't the result on the last iteration but the total number of iterations before reaching the last one. In essence:

    Iteration 1: 999 -> 729
    Iteration 2: 729 -> 126
    Iteration 3: 126 -> 12
    Iteration 4: 12 -> 2
    

    Which gives you a total depth of 4.

  • Custom User Avatar

    I see. I was only looking at the execution speed and didn't really take floating point accuracy into consideration when doing so. Thanks for pointing it out. I edited it out and now use lambda directly instead of defining a function. There's only a slight increase in speed now though.

  • Custom User Avatar

    This is just notes for those who use python and encounters this problem (Just like I did):

    • you can pass a list and a tuple as argument for game.check.
    • passing a tuple earns you a list of four "Black" if you managed to guess correctly.
    • Popping values from aset returns a tuple.
  • Custom User Avatar

    I tried modifying the error messge to include the target array length as clue. Is this fine?

  • Custom User Avatar

    Pardon, since this is my first kata, I think I misunderstood that preloaded stuff isn't included in the whole code run time. Thanks for pointing it out. I moved it now to the Test Cases tab. Thanks.

  • Custom User Avatar

    Sorry, my mistake, I probably forgot to check the example results. Thanks for pointing it out!