(C) Лиса и змейка

public
yeskendir.sultanov Apr 26, 2024 Never 51
Clone
Python C.py 17 lines (15 loc) | 412 Bytes
1
n, m = map(int, input().split())
2
table = [['.' for j in range(m)] for i in range(n)]
3
4
for i in range(n):
5
if i % 2 == 0:
6
for j in range(m):
7
table[i][j] = '#'
8
else:
9
if (i // 2) % 2 == 0:
10
table[i][m - 1] = '#'
11
else:
12
table[i][0] = '#'
13
14
for row in table:
15
for cell in row:
16
print(cell, end='')
17
print()