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.
Hello, I run into the same error, numbers[0] and numbers[1] are int values an explicit cast like "result+= (long)numbers[0] should solve the problem. Without explicit cast there is an overflow. Hope it helps you.
The sum of
int
s is an int.C++17, paragraphs 8.5.6, 8.3 and 7.6: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4713.pdf
Read this on how to use markdown formatting. I can confirm the overflow is a problem with your code, check what you're doing there, you need some casting.
long
is 64-bit on this platform and the tests are correct. Any overflow is a problem with your solution.Description updated based on de facto test behavior and the history of kata edits.