参考代码:
column = int(input()) s = input() row = len(s) // column arr = [list(s[i * column: (i + 1) * column] if i % 2 == 0 else list(s[(i + 1) * column - 1: i * column - 1: -1])) for i in range(row)] for j in range(column): for i in range(row): print(arr[i][j], end="")
0.0分
0 人评分