TEMA

Presentation Error

matramos preguntado 5 years ago

I have for submissions with PE

At first I thought that my solution didn't print extra spaces, for example word word would have been word word in my solution.

So i changed my solution to take into account that case, but it's still giving PE.

Any idea why is giving me PE??

Este tema fue resuelto y no puede recibir nuevas respuestas.

  • feodorv respondido 5 years ago

    Can you print accidentally two '\n'? One can left from line, second is on printing the answer as "%s\n" or cout << ans << endl.

  • matramos respondido 5 years ago

    Well it's solved. It was missing a \n i was printing just one line. Thanks for your help.

  • matramos respondido 5 years ago

    And if the input line ends with a space?

    @feodorv In that case it prints the space.

    Also if the line starts with a space.

  • feodorv respondido 5 years ago

    And if the input line ends with a space?