You need to sign in or sign up before continuing.×
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.
I'm able to pass the sample cases, but the cases tested when I click "attempt" don't pass.
I try ending the string with the null character '\0', but when indexed at +1, it always prints one character extra.
without the +1, it says the test cases failed.
Before I ended with the null character it just attached an arbitrary number of characters after the original string, but that I did sort out
This comment is hidden because it contains spoiler information about the solution
code passed 117 tests but failed 1
thanks a lot!! I just didn't think of "__int128" as a datatype....just found out about it.
I didn't understand what you meant. could you please explain ?
passed 11 out of 12 tests. expects a HUGE value to be returned for a test that failed, I don't think unsigned long long int can store anything that big.
wouldn't it be enough to use abs() instead of fabs() ?