Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inputt = input()
- a = []
- while inputt != 'end':
- a.append([int(i) for i in inputt.split()])
- inputt = input()
- n = len(a)
- m = len(a[0])
- for i in range(n):
- for j in range(m):
- j = a[(i - 1) % n][j] + a[(i + 1) % n][j] + a[i][(j - 1) % m] + a[i][(j + 1) % m]
- print(j, end=" ")
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement