faiil with 248 Christmas Puzzle

Back to General discussions forum

simonhugo     2023-02-05 20:36:23
User avatar

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: + +++++++ +++++++ +++++++++ +++++ +++++++++ +++++++ +++++++ +++++++ +++++++

gardengnome     2023-02-06 17:28:23
User avatar
gardengnome     2023-02-06 17:28:23
User avatar

A quick test of your solution - it produces output that looks like this:

*
***
*****
*

However it should look like this:

  *
 ***
*****
  *
simonhugo     2023-02-07 08:37:53
User avatar

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.

Please login and solve 5 problems to be able to post at forum