[Community Puzzle] 7-segment display

The 4th validation test contains a ‘1’ character. It’s expecting an output of a ., followed by 4 spaces followed by a #. This would make the segment size 2 ( top line is a space for the left hand bars(. on first line) followed by 2 spaces for the top segment, a trailing space for the right hand bars, and a space between the segment displays. The 4th test case is passing in a request for a segment length of 4.

Please advise.

The leading dot is probably supposed to be part of the first digit. Check the example 1 or 2 - first column is not empty but contains starting characters of the first digit. But I’m not sure if you’re supposed to add empty column if the number starts with “4”, which doesn’t have the top left corner “empty”. Or what to do, if the character to print the digits with is actually a dot too.

The leading dot on first line is part of the specifications - this is to work around the puzzle submission form stripping leading whitespace from the submitted expected results.

However, yes test case #4 is wrong in my opinion, see Test case 4 in 7-segment display community puzzle is wrong - #2

We have updated the puzzle to avoid this special cases…
Some Codingamers have to republish their solution. :slight_smile:

Damn. :sweat_smile:
I republished my solution with a few lines beginning with #.

The changing segment size is really disappointing. Especially in the case of a puzzle of the week.

The Case 2 is 562.
But I don’t know what’s wrong in my answer. In other cases, it works well .:disappointed:

the case 2 (562) uses 2-bytes character.
I did it in javascript, and this is the way I made my program work :
var C = readline(); if(C.length == 2) C = C[1];
if C’s length is 2, I take only the second character.
Yeah, it’s dirty. But it works.

We have updated the puzzle to avoid this special cases…
Some Codingamers have to republish their solution. :slight_smile:

The update needs some time to get in effect, or what? Cos it still does not work.

You migth refresh the IDE (Ctrl + F5) or submit your old solution and re-open the puzzle.

Thanks, refresh worked. I see you totally changed all of it - no extended segments, no dot at start. I thought you’d only change the showstopper multibyte character.

Now just a re-submit will not work, people have to adapt their solutions to the new puzzle.
(For the record, I’m not complaining :stuck_out_tongue: I’m just clarifying)

Sorry to pester, but there’s one more thing I wonder. What happens now with the solution browser? In the puzzle listing, it still shows 100+ people solved this puzzle. But when I go to browse the solutions, it doesn’t show any old ones, as far as I can see. Well, almost…
It actually shows my own old solutions. (I’ve not resubmitted any successful new ones). I wonder if it’s something to do with “always show the logged in user his own solutions even if they were for an outdated revision of the rules”. Or if it’s because I possibly submitted them after you fixed the puzzle, but before I refreshed my IDE so I apparently were still using the old validators.

We didn’t reset the counter of people who solved the puzzle, we just updated the tests/validators for the next coders.
We also tagged the old published solutions as ‘not published’ to reduce the pull incorrect solutions but we didn’t remove/recompute solutions even if it doesn’t work anymore.

It’s completely different from the former one. 1,4,7 has totally changed.:stuck_out_tongue_closed_eyes:

Finally, I pass it.:grin::joy:

The rules have changed!! :expressionless:

Excellent. I really appreciate that you took the effort to fix the inconsistencies. Thank you!
The alternative (advanced) version could be available as a separate community puzzle as it can be used to demonstrate slightly vague and eventually surprising requirements that will test how adaptable one’s solution is.

I get that :

Console output
Standard Output Stream:

>  ##
> #  #
> #  #
>  ##
> #  #
> #  #
>  ##

Failure
Found: Nothing

Expected: Nothing

What I am missing?

1 Like

The console output only shows lines from the first non empty line to the last non empty line. You may have printed an empty line after the output. Check your code to see if this happens, and if it does, remove the extra newline.

1 Like