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.
It would be good if the website accepts C++20.
It only accepts C++17 as of now (10/2022).
Added
No, the tests are just bad, and there're already many issues about this. Also, not a suggestion.
Using BF is brutal in on itself😂
Thank you!
The python version already generates input with invalid separators, and there are a few such fixed tests too.
Noted. FWIW, this kata was written long before those guidelines were published.
Whatever you may say, this is and remains a bad practice, and in fact a kata issue. The official CW guidelines about authoring in C++ are clear: Appropriate containers should be used, especially when used as input arguments or return values: (...) std::string or std::string_view should be used instead of C-strings.
Firstly, the "annoyance" (which if any is rather minor) is resolved with one line,
Secondly, it is clearly not worth my time to rework the eliminate of the
cstring
.If you feel strongly about it, go ahead, be my guest and do it yourself.
It's not a reason for using those old, annoying and flawfull cstrings when we have much better strings implemented in C++.
I disagree. Python and Java are two different languagues.
C++ originated from C, to support the OOP paradigm.
I agree, C++ and C are different languages
... did you define it? otherwise that's not very weird.
I disagree, respectfully.
C++ evolved from the C legacy, the very language that powers the great Linux OS.
Besides, with just one line
std::string inp(in);
you can move into thestring
datatype, right?