[Community Puzzle] The broken editor

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Fanfouer,validated by @TheSwine,@Alcalyn and @dinobogan.
If you have any issues, feel free to ping them.


I’m trying to solve this puzzle in python, my solution passes all test cases in IDE but when I submit it it fails to pass validator 007.
I’ve tried putting test case 007 into custom data and it fails because last space in input string is somehow lost when I run the code.

The input string of validator 007 does not end with a space, so the issue is probably something with your code.

Thank you, I’m looking into it.

I can confirm that 007 test case is a failure

1 Like

I solved the puzzle with C++. It succeeds when running all the standard tests, but fails when running the 007 test from the custom test. For some reason the last space is dropped from stdin.

I solved the puzzle in Python with the same result. The last space (or spaces) are dropped when running 007 in the custom test window.

Probably a bug not specific to this particular puzzle, but more about the CG website itself? If I remember correctly, I encountered a similar issue for some other puzzles.

as a work around for the space at the end of test 007, I remove spaces at the beginning and at the end of the string from the input . So no more space ! And all test pass successfully.
But validators 003 and 006 fails for me.
A question for the author:
Is-it possible to have more tests here for example ? I would like to test my code on more tests… Don’t put the validators tests of course but others tests so I can test again my code.
Beacuse right now, i have no more clue on how to improve my code to validate the puzzle…

Thank you

It doesn’t look like the author is still active…

I don’t have to trim any spaces in my solution. I guess you have to change the code so that it can work properly without initially removing spaces from the input string?

1 Like

Hi everyone.
For the 007 testcase, there is indeed an issue because the input line has a space at the end.
On c++ solutions, the getline command to get the string doesn’t include additional space before or after the string, so it doesn’t work. Hence, you can’t rely on the default code to get your input string. Good luck finding something else !