Back to General discussions forum
I don't understand what is wrong with my code. On the page where the Wrong is shown, it indicates the output that my program supposedly gives for the input.
Well, I copy that input, go back to the problem and run it with that input and the output that my program gives is NOT the one shown in the Wrong page.
An example: Your answer is Wrong Line 2 is somewhat wrong for input 2 1 3 2 2 7 1 2 5 2 4 7 0 Your answer was: + +++ + +++++ +++++++++ + +++++++ +++++++++++++ +++++++++++++++++++ + +
OK. I copy that entry, go back to the problem page, run it and,... this is the output: + +++++++ +++++++ +++++++++ +++++ +++++++++ +++++++ +++++++ +++++++ +++++++
A quick test of your solution - it produces output that looks like this:
*
***
*****
*
However it should look like this:
*
***
*****
*
Thank you. It was a misinterpretation on my part of:
"add padding with spaces at the beginning of each line to align better, the exact number is not important"
which I interpreted as:
"it is not important to add exact number of spaces padding with spaces at the beginning of each line to align better"
In any case, what surprises me is that the output that the judge indicates that my program generates for some given data, does not correspond to the output that I get if I copy that data and put it as program input.