#46034: python用zip()


hogyulai@gmail.com (幻宇)


測資檔會包含多組矩陣資料
while True:
    try:
        rows, cols = map(int, input().split())
抓EOF錯誤
    except EOFError:
        break
 
    matrix = [list(map(int, input().split())) for _ in range(rows)]
 
    transposed = zip(*matrix)
輸出
    for row in transposed:
        print(*row)