Run ID:153228

提交时间:2026-05-10 14:45:04

rows,cols = input().split() rows,cols = int(rows),int(cols) a = [] for i in range(rows): tmp = input().split() a .append(tmp) b = [ [0]*rows for x in range(cols)] t = 0 for col in range(cols): for row in range(rows-1,-1,-1): x = t//rows y = t% rows b[x][y] = a[row][col] t+=1 for row in b: for item in row: print(item,end=" ") print()