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
This comment is hidden because it contains spoiler information about the solution
@KirinCupr: just a quick confirmation - you're completely right, the creator of the Kata has defined "input_str" as a constant here, so while we can read its value, we must not change/manipulate it! ... The C++ documentation says about the use of the keyword "const": "an object whose type is 'const-qualified', or a non-mutable subobject of a const object. Such object cannot be modified: attempt to do so directly is a compile-time error ..."
Hello. I'm think we create new variable because "input_str" is is const (const std::string& input_str). So we can't change it. If I'm wrong, please, correct me.
=> unpublishing.
Interesting, a part of the puzzle is in examples and the other part is in testcases
Hello, how i can suggest contribution with kata description?
I think to change alcohol description subject to education relevant and neutral subject.
Thanks.
Fixed.
IMHO figuring out is a major part of this kata. It's tagged
puzzle
.Cool kata, congratulations.
Seems absurd that the average rank for this is 6kyu. This is like a 7kyu, tops.
This kata is way too easy and loose it's a bad challenge. It also has other problems.
Moral of the story: Writing a code golf kata needs experience, so don't try this at home, kids, at least not without appropriate skills to do it well!
I actually had in mind always displaying a message, not just when your code is too long. I've edited the test a little - what do you think?
This also tells dcsmith his code length is not
25
but14
, because the function name isn't counted.Counting like that,
35
characters suddenly seems quite generous BTW.done
Alternatively, you could relax the limit.
Of course there is a shortest solution, probably only one.
Are you interested in getting the shortest possible solution umpteen times, or people challenging their creativity to come up with different short, but not necessarily shortest, versions? Some people might even submit code that sacrifices some shortness for increased readability (though in this case, the shortest solution is quite readable).
ETA: the limit as it is does not really need relaxing. see above somewhere.
Loading more items...