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.
This comment is hidden because it contains spoiler information about the solution
I did what you ask. No need for a reference solution
Also, I increased the number of test to 500, so the probability of getting every length from 1 to 50 is ~99.8% (before it was ~0.02%).
It's 7 kyu kata, I don't think there's a need to make it more complicated than it already is
Is this a question? The short answer is probably "no".
The long answer is that tests are specifically written to avoid 64 bit overflow, so the answer is probably "no".
You are free to do or return whatever you want inside (and sometimes even outside) of the function, as long as the function signature stays the same
Do your magic, wizard :^)
Все тесты корректные, внимательно читай условие задачи, в частности, последний пункт.
Ah, okay.
@o2001 I think while translating this specific kata to C++ it happens to be one of these cases where it would be better to just keep the signature it as is. After all, C++ does have null-terminated strings, and this kata is focused primarily on them, not strings as a concept in general.
Also, we have this kata, which is specifically made for C and descendents of C. I think if following the example and adding something about C in the title would help to avoid this problem.
Just yell at people for translating to any language that has no null-terminator and reject, as we already do with BF translations
@Wizardll o2001 alredy kindly handled all issues in his fork. Please, review it.
@Wizardll you're still not following guidelines. Just review this fork, please.
Not particularly a critical issue, but adding assertion messages to C++ would not hurt.
Closing because it's not a kata issue. Carefully read the description, you'll understand what you do wrong.
This comment is hidden because it contains spoiler information about the solution
Loading more items...