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.
Please give these guidelines a read. Particularly, try to look at this example as a good idea of how the tests should be formatted: try to avoid using
preloaded
, as the guidelines state, and instead ofstd::cout
, supply anExtraMessage
argument toAssert::That
. Also theif (r > INT_MAX)
branch seems redundant to me since the maximum value generated by your tests,(INT_MAX / 1024) + 200000 * 1000
is still less thanINT_MAX
. Make sure every code snippet begins with any and all headers used in that snippetc++ translation: https://www.codewars.com/kumite/6641ca9f5b211314c218f362?sel=6641ca9f5b211314c218f362
If my understanding is correct, when the 2nd parameter ("b", in your case) is 2 or 3, the expected value of n3 should be equal to n2, but n3 is actually set to 0 by your code.
Pure maths. It's nice to be able to switch off from programming every now and then and pretend I'm a mathematician ;-)