Medium
Transpose and Flatten
Read r and c, then r rows. Print the transposed array as a nested list, then the original array flattened.
Input
r c, then r rows.
Output
Two lines.
Sample 1
Input
2 3 1 2 3 4 5 6
Output
[[1, 4], [2, 5], [3, 6]] [1, 2, 3, 4, 5, 6]
Sample 2
Input
1 1 9
Output
[[9]] [9]
Output appears here