Contest Challenges Comments
Comments

@Stefan, 4+4+16+4+4+28+4+4 = 68. You don't double it again when it's next to another 2.

shouldn't the 3rd Test Input be true too? 3 (3*1) + 33 (3*11) + 333 (3*111) = 369

@Florian, you need to select the correct change exactly. 369 is not equal to 365, and there's no way to get 365 with those coins.

I have a solution but I think there is a better way to do it. Is there a solution that we can see?

@Patrick Lu, I added a featured answer, see also the Learneroo blog.

"The Prince will initially start with power P." It is not given in itput. What its value?

@Egor, he will start with the power of the first city he visits. Sorry for the confusion.

The first line of input contains the number of test cases... kind of matters...

Hmm... I pass the test input but not contest input... possibly something wrong with this problem?

Sorry, the challenge has been clarified, see above. Next time you're hired as reviewers!

So wait, can he start from only the topleft city at (0, 0)? Or could he start at any city on the left side?

@James, he can start any city on the left side, as shown in the picture on top.

Hint: Add before, then add the 3.

Final Hint: Note the first letter, and with more work the last and middle.

Thanks for the hint! I won't be sleeping tonight :P
Stefan
May 26, 10:36 AM2 2 8 2 2 14 2 2 68 is 90 not 68