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.
Please, when posting code always use the spoiler tag and correctly format it (using a starting and ending triple backtick).
I tried to reproduce the case you linked, but the
Expected
value is correctly given (1): you can also see it by yourself, as12**836==144**209
. Also, I think you missed the point that in this kata you have to return -1 if the first argument is bigger.Finally: very creative solution, but I doubt that is always going to work.
This comment is hidden because it contains spoiler information about the solution
An interesting discussion concerning this kata difficulty and the general ranking system on CW: if you have anything to say, everyone's contributions are welcome :)
Mh, that's not the way I would recommend as it is rather open to edge/ambigous cases, but let me know if it works :)
For anyone having trouble solving this kata when it comes to tests that result in Infinity - you need to find a way to calculate the number of digits that will be in the a^b result, rather than trying to calculate the actual result.
Jake listened to your prayers and the kata was thus upranked :)
Well, proposal for a discussion about ranking in general submitted, if anyone feels like contributing :)
Same as below: you can't solve this kata if you calculate each single power.
Random tests needs to be fixed for JS they are sending in integers that are too large and being operated on as infinity