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.
The problem is that
static
preservesi
across every call toreplaceNth
. It's only assigned0
at compile time. After that each iteration updates the value. So if you're only running this once then it'll behave as you intended. After that first pass it's anyone's guess as to what the starting value will be. Removestatic
, move the declaration outside the lambda, and change the capture from[=]
to[&]
. It'll work fine then.Fixed
Kata dificulty is relative to your knowledge and experience. For example before I did my first graph problems I thought it was difficult, after a few then not so much. If you've done ASCII operations before of course it is easy.
Yeah, this was definitely an 8 kyu challenge.
This comment is hidden because it contains spoiler information about the solution
Gern geschehen! Danke, dass du mich auf den Fehler aufmerksam gemacht hast! :-)
I just tested it, the issue is fixed. Thank you, @HerrWert.
@siebenschlaefer, do you not have write access because you've contributed to this kata? :-)
https://www.codewars.com/kata/pole-vault-starting-marks/edit
OK, thanks for that tip. I just added that line above the tests. I placed it directly above another #include statement. Please let me know if that works.
@Dentzil, @HerrWert or anybody else with write access:
Just put the line
on top of the tests.
This comment is hidden because it contains spoiler information about the solution
Works now;-)! Many thanks for your correction!
Oh, sorry, now it's correct.
Hi
@Dentzil
, are you sure?Should be:
...but it's still "7,7,FALSE"?
Hi
@masterridley
and@smile67
,it shoud be fixed now.
The average value is rounded now to the nearest int according to the description.
Loading more items...