[Community Puzzle] Rock Paper Scissors Lizard Spock


#1

https://www.codingame.com/training/easy/rock-paper-scissors-lizard-spock

Send your feedback or ask for help here!

Created by @_Vincent,validated by @java_coffee_cup,@Niako and @helgui.
If you have any issues, feel free to ping them.


#2

It was a cool puzzle to solve. Thanks for the contribution :D.


#3

Okay. Starting to get irritated here as I don’t know what I’m doing wrong. I can get the solution but the server won’t accept it. I get this:

Standard Output Stream:

2
6 5 1

Failure

Found: 6 5 1
Expected: Nothing

Also, if I output to cerr, it is read as output to cout.

Could someone explain what’s going on here, please? :slight_smile:


#4

did you add \n (newline) after 6 5 1 ?


#5

Yes, I did. I’ve traced the error since your kind reply: my output had a trailing space after the final digit, which was apparently unacceptable. I’ve amended my code to produce spaces less indiscriminately and the code seems to work now.

Thank you for your help. :slight_smile:


#6

i think after symbol 1 you have a symbol space (" "). there is shouldn’t be.
(Expected: Nothing)