Generating a grid

Write a program that, given triples of positive natural numbers
n, m, side generates grids with n×m squares with side side as those
shown in the examples.

Input

An arbitrary number of cases, each of them consisting of three positive
natural numbers n, m, side on one line.

Output

For each case, the corresponding grid followed by a blank line.

Observation

You can generate the output character by character or with strings built
previously, it’s up to you.

Assessment over 10 points:

- Slow solution: 5 points.

- Fast solution: 10 points.

We understand as fast solution one being correct, with linear cost and
able to overcome both the public and private tests. We understand as
slow solution one not being fast, but correct and able to overcome the
public tests.

Problem information

Author: PRO1

Generation: 2026-01-25T21:43:55.652Z

© Jutge.org, 2006–2026.
https://jutge.org
