Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. inp = open('input.txt', 'r')
  2. out = open('output.txt', 'w')
  3. mas = list(map(int,inp.readline().strip().split()))
  4. n = mas[0]
  5. m = mas[1]
  6. arr = []
  7. for i in range(n):
  8. arr.append(list(map(int, inp.readline().split())))
  9. out.write(str(m) + ' ' + str(n))
  10. out.write('\n')
  11. for i in range(m):
  12. for j in range(n - 1, -1, -1):
  13. out.write(str(arr[j][i]) + ' ')
  14. out.write('\n')
  15. inp.close()
  16. out.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement