Since Kotlin Int is only a 32-bit signed integer the expected solution overflows for disks >= 32 and the reference solution yields an incorrect value for disks = 31. Please extends the return type at least to Long or BigInteger and make the tests a lttle bit more random.
It is difficult sometimes to gauge kata. What is easy for one person maybe challenging for another and vice versa. Humility is an endearing quality don't you find?
Approved
approved by
Since Kotlin
Int
is only a 32-bit signed integer the expected solution overflows fordisks >= 32
and the reference solution yields an incorrect value fordisks = 31
. Please extends the return type at least toLong
orBigInteger
and make the tests a lttle bit more random.This comment is hidden because it contains spoiler information about the solution
I find it really strange how similar our answers look.
Python Translation
Kotlin Translation (based on the Java one)
It is difficult sometimes to gauge kata. What is easy for one person maybe challenging for another and vice versa. Humility is an endearing quality don't you find?
Approved, thanks :)
Oh thanks a lot. Just getting started with classes xd
If there are no arguments passed, you should raise an error. (if not args: raise Error)
How do i solve "exception expected" error? (solved all random cases, Python)
the kata, the 8th grader comeback, the username, etc...
Your comment or this kata?
Loading more items...