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.
I don't understand the underlying maths: e.g. if we start at 7, and the jewels are behind doors number 10, we haveto pay 7 + 8 + 9 + 10 = 34, however the description says it is 26. Where is 26 coming from?
yeah, he is experient!
Interesting kata, thanks.
Enjoyable programming kata indeed.
del
Maybe this paragraph will help? https://docs.codewars.com/training/troubleshooting#timeout
I get this answer:
Test Results:
Random Tests
cost -- random
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
make_min_tree -- random
Test Passed
Test Passed
STDERR
Execution Timed Out (12000 ms)
How can I understans what is going on?
Sorry for the typo, I have correct the comment. Thanks.
The left side of
==
is a tower of hight 3, whereas the right side is a tower of hight 4, it seems. That's what i find confusing. Do you mean:This would match the Python test.
In Lua,
13 ^ (30 + 13 ^ tower(13, 2, 30))
would overflow and can't produce the correct result. There's also nopowmod
function in Lua. To be consistent with the Python test cases, I left a comment here to help users notice the cycles.I noticed this comment:
Why?
we've put all translations on hold, due to clarification needed for some edge cases; maybe talk with monadius about this
Lua translation!
Brilliant Kata! Truly enjoyed it!
I'm glad you enjoyed the kata. Hopefully you solved it by your own reasoning before you found out about a "trick", and that's what's important.
Loading more items...