printРабочее место участника

printЗадачи

586. Draw Grid

Ограничения: время – 1s/2s, память – 32MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

It is very easy to draw grids with ASCII characters. For example look at the picture below. It shows a (2x3) grid, where each smallest square is of size 2.
+--+--+--+
|..|..|..|
|..|..|..|
+--+--+--+
|..|..|..|
|..|..|..|
+--+--+--+
In this problem your job is very simple: Given sizes of the grid and size of smallest square, you will just have to draw the grid.
Input
First line of the input contains three integers `S`, `N` and `M` (`0\ <\ S,\ N,\ M\ ≤\ 10`). Here `S` is the size of smallest squares, `N` and `M` are the sizes of the grid.
Output
You'd have to print an (`N`x`M`) sized grid where each smallest square is of size (`S`x`S`). Note that blank places are denoted with '.'.

Sample Input

2 2 3

Sample Output

+--+--+--+
|..|..|..|
|..|..|..|
+--+--+--+
|..|..|..|
|..|..|..|
+--+--+--+
loading