Синицын Виктор Сергеевич, 319/1 DrawSquare 5205 | Князев Максим Алексеевич, 319/2 DrawSquare 5583 | ||||
---|---|---|---|---|---|
t | 1 | def squares(w, h, *arr): | t | 1 | def squares(w, h, *args): |
2 | lst = [['.' for _ in range(w)] for _ in range(h)] | 2 | table = [['.' for _ in range(w)] for _ in range(h)] | ||
3 | for elem in arr: | 3 | for i in args: | ||
4 | for i in range(elem[2]): | 4 | for j in range(i[2]): | ||
5 | for j in range(elem[2]): | 5 | for k in range(i[2]): | ||
6 | lst[elem[1] + i][elem[0] + j] = elem[3] | 6 | table[i[1] + j][i[0] + k] = i[3] | ||
7 | for elem in lst: | 7 | for i in table: | ||
8 | print(''.join(elem)) | 8 | print(''.join(i)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|