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.
Instead of saying
- 1 * (expression)
, you could say- (expression)
, as boolean values are interpreted as 1 or 0 in arithmetic, and you can subtract those as well like you can do with (almost) any value.I missed the point that I know the number of pits
but there is one single pit, so it cannot be anywhere else than at (1,1)
I fail to understand how this one could be True:
_ _ _ _
_ P _ _
_ _ _ _
_ W _ G
The agent feels the wind in (0,1) and (1,0), but pits could be at (2,0) and (0,2).
This comment is hidden because it contains spoiler information about the solution
Hi @quedo - no the error is with your code. I pasted it into the editor and there's even a helpful error message explaining what is going wrong:
Your code is not mapping the letter
m
toz
correctly. The reason is that, form
the value ofc
that you are using corresponds toc=122
. Now insertc=122
into your code and see what value appears after your calculations.It certainly works.
Please read this: https://docs.codewars.com/training/troubleshooting#post-discourse
This comment is hidden because it contains spoiler information about the solution