f | def squares(w, h, *tuples): | f | def squares(w, h, *tuples): |
| n = len(tuples) | | n = len(tuples) |
n | A = [['.'] * w for i in range(h)] | n | a = [['.'] * w for i in range(h)] |
| t = 0 | | t = 0 |
| for t in range(n): | | for t in range(n): |
n | X = tuples[t][0] | n | x = tuples[t][0] |
| Y = tuples[t][1] | | y = tuples[t][1] |
| s = tuples[t][2] | | s = tuples[t][2] |
| c = tuples[t][3] | | c = tuples[t][3] |
| for k in range(s): | | for k in range(s): |
| for l in range(s): | | for l in range(s): |
n | A[Y + k][X + l] = c | n | a[y + k][x + l] = c |
| for i in range(h): | | for i in range(h): |
| for j in range(w): | | for j in range(w): |
t | (print(A[i][j], end=''),) | t | print(a[i][j], end='') |
| print() | | print() |
| import sys | | import sys |
| exec(sys.stdin.read(), globals()) | | exec(sys.stdin.read(), globals()) |