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 agree, the types used in a kata should not depend on one particular compiler implementation. In particular, if you need an integer type that must hold values larger than what fits in 32 bit, it would be better to use one of the fixed-width integer types from cstdint, e.g. int64_t.
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.in c++ input parameter has type long, but 10e10 numbers can't fit into long, maybe change to long long?
There are multiple errors with test cases in c++: