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 added a requirement checking that the long was less than or equal to 9999999999999999 and returning false if otherwise. Afterward, more of the tests were failing. could have been my own implementation issues. In any case, I ended up fixing my function as per your earlier help and it passed everything.
Yep. fixed it. misread the description. all my bad. Thanks!
For 2121, digits are 2,1,2,1 and after multiplication, they are 4,1,4,1.
For even lengths, multiplication starts from the leftmost digit. its even presented in examples.
I checked tests and they do not generate numbers longer than 16 digits. Why do you think they do? Do you have any example of such input?
Another issue while coding in C:
It says that inputs are positive integers of up to 16 digits, but when I try to
test to see that there are 16 digits or less, I am not passing more of the tests
than before because they are attempting to test integers longer than 16 digits.
In testing, it has 2121, expected true.
but, even amount of digits, so we double starting with the first:
2, 2, 2, 2 are remaining. sum is 8. It is not a valid number.
I am coding in C.