Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
As someone said, taking a look at the Primality Test in Wikipedia is REALLY helpful on this one.
i did this in one line
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?
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
Agree!
Too many other Kata fall in the same boat.
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.
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.
Great overall kata! Congrats! It was well explained with really good examples and it was challenging enough.
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!!!
Appreciate adding support for Python 3. Subtle changes but still necessary. Other than that, nice one.
Definitely too easy for 4kyu. Wording of the kata could be better but ok.
Nice kata! My compliments! My solution was so messy. Need to improve my recursivity.
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.
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...