w, h = [int(input(x)) for x in ("Ширина: ", "Высота: ")] matrix = [[0 for _ in range(h)] for _ in range(w)] num = 1; for col in range(w): if (col + 1) % 2 == 1: for a in range(h): matrix[col][a] = num num += 1 else: for a in range(h - 1, -1, -1): matrix[col][a] = num num += 1 for col in range(h): for row in range(w): print(matrix[row][col], end=' ') print()
5628
недавно проходили