Ad
  • Custom User Avatar

    ok. Understood. I will look into fixing that. However, Im currently way north of the arctic circle with very spotty internet, so will take a couple of days

  • Custom User Avatar

    You cut the text, it says:
    "This can be solved by translating any instruction to turn the dial left, to a corresponding right turn. A left turn of 11, for example, would leave the dial at label 8, which means that the smallest equivalent number of turns to the right is 7."

    And there is an example with a turn to the right of size 10, so should be more clear now.

    I want them to be handled differently.

  • Custom User Avatar

    Markin this as solves. As this is specified in the description and I have motivated the reasoning elsewhere in these threads.

  • Custom User Avatar

    Could you elaborate, not sure that I follow.

  • Custom User Avatar

    As I wrote in another thread:

    The reason I decided to filter out anything that was divisible by 9 is that I do not think a Dial Combination Safe ever would have a sequence where the same label showed up in sequence.
    I do not think one of those old lock ever could have a password combination that was, for example, 1-2-3-3-5 since going from 3 to 3 means not turning the dial at all.

    So, to fit into the narrative a bit, I decided that the passwords here also would not have any such sequences.

  • Custom User Avatar

    Hi, the reason I decided to filter out anything that was divisible by 9 is that I do not think a Dial Combination Safe ever would have a sequence where the same label showed up in sequence.
    I do not think one of those old lock ever could have a password combination that was, for example, 1-2-3-3-5 since going from 3 to 3 means not turning the dial at all.

    So, to fit into the narrative a bit, I decided that the passwords here also would not have any such sequences.

  • Custom User Avatar

    That is actually by design. I made it like that such that it would be different handling for L and R.
    The only reason I made the answer take a product of R-turns and the label it landed on, was to force the user to translate the L turns into R turns at all.
    And since any L turn could be translated to different number of R turns, depending on how many full rotations, I decided to put in that info for the Left turns.

  • Custom User Avatar

    Have a look now. Now there are 100 random tests and it is random sequences generated instead.

  • Custom User Avatar
  • Custom User Avatar

    This should be solved now.
    May use your solution as the correct solution?

  • Custom User Avatar

    Just saw that myself. Publishing new now

  • Custom User Avatar

    You are right. Im on it

  • Custom User Avatar

    I wanted to avoid going via strings.

  • Custom User Avatar

    Sorry that me changing the Kata broke your solution. If you have the chance, I'd love to see it resubmitted. Should be enough to remove the package of your code.

  • Custom User Avatar

    Thanks for this. It should now be fixed.
    Please keep in mind that the packages have also been removed from the tests and the initial solution.

  • Loading more items...