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.
very fun kata! :)
For C, if n is a + b and both a and b are non-negative, then why does the function pass in a signed value (and why is it "const")? That needless complictes this clever problem.
You are probably solving on 64-bit Windows where
long
is 32-bit. Codewars runs on 64-bit Linux wherelong
is 64-bit. As a quickfix, you can uselong long
in your solution. But I agree, this is an issue, C/C++ code on Codewars should never uselong
as it makes the user experience worse for Windows users.finally solved...cant believe it! after expeding some time a day trying to optimice. Learnt a lot :3