Ad
  • Custom User Avatar

    You need to pick the best possible combination of guards, in correct order, that would cost you the least amount of bribes if the jewels are in the worst possible room for you.

  • Default User Avatar

    As someone said, taking a look at the Primality Test in Wikipedia is REALLY helpful on this one.

  • Default User Avatar
  • Default User Avatar

    Well, looks my comment was vastly misunderstood. I was just saying I was expecting a bit more of coding effort. Of course, Andi is 100% right and instead of using the library I could have started from scratch but we are supposed to get help from the ones who walked the same path before us, don't we?

  • Default User Avatar

    python is a language employed by big tech companies to de-skill software engineers. Don't buy into all of its "rich" libraries. Learn everything yourself

  • Default User Avatar

    Agree!
    Too many other Kata fall in the same boat.

  • Custom User Avatar

    I haven't solved it yet, but you don't need to add all the bribes as you see in the example doing a binary search.

  • Default User Avatar

    I just read the description like 5 times and still don't get your idea of a worst case scenario. Obviously you need the sum of all the bribes in the worst case scenario which is that you guess the right door after attempting all the others first. But that doesn't involve any coding, so I'm back at square one totally clueless about what I'm supposed to do.

  • Default User Avatar

    Great overall kata! Congrats! It was well explained with really good examples and it was challenging enough.

  • Default User Avatar

    WOW!!!! I usually have very verbose code but yours is definitely off the charts. You should take a close look to the experienced guys' solutions and learn from there. And in this particular one, you're inventing the wheel when it's already invented long time ago. You are calculating the GCD from scratch and in not an efficient way instead of using the built-in function. Python comes with batteries included so take advantage of them!!!

  • Default User Avatar

    Appreciate adding support for Python 3. Subtle changes but still necessary. Other than that, nice one.

  • Default User Avatar

    Definitely too easy for 4kyu. Wording of the kata could be better but ok.

  • Default User Avatar

    Nice kata! My compliments! My solution was so messy. Need to improve my recursivity.

  • Default User Avatar

    Many complain about the description. It's not perfect but it's good enough. I've seen much worse. For the kata itself, it was kind of surprising to pass at the first attempt with quite a brute force approach. Was expecting a timeout.

  • Default User Avatar

    Codewars is meant to be a self-help training site where you can work on your coding skills.It's not the Kata creator's job to limit you.Just like there's nothing stopping you from copy-pasting the solution from Google but what's the point in doing it?The only one that's at a lose is you.

  • Loading more items...