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.
This comment is hidden because it contains spoiler information about the solution
Lua translation! (author inactive)
I pass 631 tests successfully, but there is an error in one. Test 13:
Expected: '6', instead got: '4'.
No idea what the problem is...
Buggy solutions are able to pass (JS). Here are some random tests that my solution fails:
Perhaps adding some fixed tests can seal this crack?
Carried over from an issue marked as resolved below which was not really fixed:
C version
Please clarify the constraints for this Kata, it will be really helpful to understand how fierce the test are.
Could someone with > 10k reputation improve the Python tests to kill this invalid solution?
For example, it returns
1
for[0, 660]
, but the correct answer would be0
.It just happens to pass the tests most of the time, depending on which random numbers come up.
D translation
Does anyone have a simple explanation of the solution?
It's clear the exponent has to be calculated using a module multiple of four but I don't understand the maths how this is achieved.
man this one is realy hard for me. I figured, that Euler's theorem needs to be used, but what to do when first number isnt mutualy simple with 10? In that case theorem doesnt work... i feel like i missed something simple, I've been struggling for a couple days now and i really need some hint
Haskell, Swift, and possibly other languages contain
laziness test
test case, which is not present in other language versions, and brings additional step of difficulty to the task.It should be either added to all languages which can handle it (for example, C# does not have it, but could), or be removed.
This comment is hidden because it contains spoiler information about the solution
Can
xn
be a negative? If not, it seems to be written in the description.Hi, my solution in Haskell passed all 16 tests, failed 0, but
timed out (12000 ms)
with anexit code 1
. It's a translation from my Python solution usingfoldr1
.Could you give some more hint on how to make it lazier as mentioned in the earliest comment in this thread?
Thanks!
I've seen someone saying that Python tests are all correct, but...
I'm having trouble on a dozen tests with distinctly unexpected error logs... and it's not the case where it switches actual and expected answer!
e.g.:
2 should equal 8
Log
[937640, 767456, 981242] Start
[937640, 767456, 981242] treating
will apend 6 ** 2
[937640, 36] treating
will apend 0 ** 4
final list [0]
(my answer should be 0, but it sees as 2, and says that it should be 8,wtf?)
other cases that starts with [338340, 637600, 654608] and boil down to [338340, 0] should expected 1, right? anything powered to zero is one.
Loading more items...