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.
Added better/clearer test output for random tests and consolidated all tests (except sample tests) to use it.
this code passes the sample tests now; i checked the revisions and someone seems to have fixed it from the Editor.
Please use spoiler flag next time, your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
If both fighters have the same parameters, then there will be an error. This problem is taken into account in my solution.
good
It's a 4 kyu, solvers can
trace
inputs themselves.fixed
Because there's no need to reinvent the wheel.
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.
Python fork adding random tests.
Loading more items...