Community Puzzle - Bingo!

Is the stub generator in this puzzle incorrect?
The card reading loop should not end by n, but 5*n.

The stub code generator does not allow such subtilities.

When I change the stub generator to
loop n loop 5 read row:string(1024)
the code becomes

for (int i = 0; i < n; i++)
{
    for (int j = 0; j < 5; j++)
    {
        string row = Console.ReadLine();
    }
}

but when I try to save it, I get an “Invalid stub generator” :frowning:

2 Likes

Thanks your experiment euler.
If the stub generator is unable to handle such cases, future puzzles or CoC having similar input needs should have an extra integer added to facilitate the for-loop to finish correctly.
Use this puzzle as example the input can be
5
25
…(25 lines of numbers)

@eulerscheZahl: I have also tried this one. But unfortunately, this syntax is not valid according to the documentation, and thus it is rejected. :frowning:

@java_coffee_cup: Adding one more line does not make much sense. Several puzzles have a broken default code, and the only solution would be to improve the stub generator machinery.

1 Like

I have the same observation, the first loop have to be from i=1 to n, and inside another one from 1 to 5 for the rows in every ticket.