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.
fixed in C
Fixed the warning.
Exit code 132
is due to Swift crashing with*** Program crashed: Illegal instruction at 0x000055cd112cc93c ***
. "Illegal instruction" in Swift are caused by failed preconditions, such as integer overflow or out-of-bounds accesses.This one is caused by integer overflow in your
while (c != 0)
loop. You reverse the digits ofc
intom
by successive multiplications ofm
by10
and adding the last digit ofc
. This fails whenc
has as many digits asInt.max
and ends with large digits, the last multiplication by10
overflows.I added better assertion messages to Swift.
All languages except COBOL and pending translations are now identical: no rounding, integer inputs. I will review pending translations, update, and approve them too. I will try to bring COBOL to the common form too, but I'll see how it goes :)
I will close this issue and raise a new one for COBOL if I won't be able to get it to work.
This comment is hidden because it contains spoiler information about the solution
Python fork adding random tests.
Kata retired some time ago.
Haskell fork that fixes the random tests so that failed tests show the input strings along with some other minor improvements to test generation.
Added in this fork
Author changed the link, close the issue
Added in Ruby, done in this fork
out
is a local array variable. withreturn out;
you are returning the address of a local variable, which is incorrect. as soon as the function exits the address becomes invalid.out
is missing1
byte for the nul-terminatorRuby random tests added in this fork
Kata already retired.
Kata retired, translation was rejected.
Loading more items...