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.
Sorry you didn't like my response, sometimes reading the instructions again helps, now that I told you why those numbers can't be in the answer, because I did and only then suggested you read the instructions again. Again, you're not understanding what to do, you're looking at 658 as going from 6 to 8 and from 8 to 5 and you analize that pattern, right? And that's not what you should do, you saw 369, but that number can be 658 amongst others as I already explained. If you don't like my answer, just say "I don't get it", there is no shame in that, and I will try to explain it to you in another way, but please, next time, just be humble and read the instructions again now that you got new information and keep an open mind. After all, it's you who didn't get what to do and I am trying to help you.
From 369 you can reach 658 going always horizontally or vertically: from 3 to 6, 6 to 5 and 9 to 8. From 6, you can only reach 2 diagonally and the same happens when you try to go from 9 to 5. So no, 325 isn't valid. You're confused about what you should do, you start with a number, let's say 369, but you're not sure that's the number the robber entered, the 3 could also be a 2 or a 6, but not a 5, etc. Read the instructions again.
Yes, returning
ACA
kills you by your own actions. A proper way to win here isACBA
. I added this to sample tests.yet another happy customer, what an easy job
See the keypad again, 3 and 5 are adjacent, but diagonally.
There is this mechanism which sometimes, under some circumstances, allows users to see the most recently attempted solution of another user. It is somewhat buggy and does not work always, but I was able to see one of your solutions, copy it, and test it.
Sorry, we can't tell you whats wrong woth your code without seeing your code.
As I said, all inputs are below 5000. However, your solution does seem to be too slow: for some inputs it works well, for many inputs it seems to take 300-800ms, and for some very unfavorable inputs like
n=4771,k=4331
orn=4703,k=4744
it seems to run for ~1.5s. Considering that there is 40 random tests, it seems that your solution is very likely to time out.In Python, both
n
andk
can go up to 5000.