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.
Not a kata issue.
The only way to return 0 from your solution is when it catches and silences an exception. Generally, your code seems to throw exceptions left and right, and then forcibly silences them.
There is quite a lot of fixing to do. Removing all
try / catch(...)
would be a good first step.If you got a message that
"Expected: 19009 Actual: 10990."
and then you put10990
in your IDE, then you read the tests an failure messages wrong. "expected" is what tests want you to return, "actual" is what you returned, andn = XXXXXX
displayed in an assertion message is what you should put in your IDE.Print the input: https://docs.codewars.com/training/troubleshooting/#print-input In the error message, actual is what your function returned instead of the expected value. Without the input we can't tell if your code is right or wrong.
My solution works correctly in clion on laptop , but when I copied my solution and tried it , I got an error:
Expected: 19009 Actual: 10990. When I putting 10990 in clion , my solution returns 19009. I actually tried to copy it about 3 times and all another cases is OK, so what type of problem I have and maybe somebody knows what to do?
P.S.: I also got an error/warning for using atoi(). What is atoi() problem and why I should refuse to use it?