NyanCoder

Untitled

Feb 27th, 2017
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. def f(mat):
  2.     l = len(mat) // 2
  3.     for line in mat:
  4.         for x in range(l):
  5.             line[x], line[x + l] = line[x + l], line[x]
  6. '''Вводишь n, потом матрицу'''
  7. A = [[int(x) for x in input().split()] for _ in range(int(input())*2)]
  8. f(A)
  9. for x in A:
  10.     print()
  11.     for y in x:
  12.         print(y, end = ' ')
Advertisement
Add Comment
Please, Sign In to add comment