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.
your buffer is not large enough, and as a result you are writing out-of-bounds and corrupting the tests suite.
note that
printf("%d", INT_MIN) == 11
Look at begining of your function. Empty array is
{}
{{}}
- array containing 1 empty array.;)
I noticed that too. Sometimes my solution pass the random tests and sometimes it results in incorrect answer for extremely large tests where exponent is small enough.
UPD: Tested my solution against reference solution with large
base/modulo
and exponent between1/100
. It's guaranteed that in the caseexponent >= 1 <= 7
my solution fails.invalid input I got was:
-1
0
-101
You're welcome
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You have exactly one way to give out 0 change: give out 0 coins. This is consistent with the binomial coefficient in mathmatics, which gives
n over 0 = 1
(i.e. you have 1 possiblity to choose 0 elements from n).