Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = []
- n1 = []
- nn = []
- c = True
- while c == True:
- a = [i for i in input().split()]
- n.append(a)
- if n[-1][0] == 'end':
- c = False
- n1 = n[::][:-1]
- nn = n1
- raw = len(n1)
- col = len(n1[0])
- print(raw, col)
- for i in range(raw):
- for j in range(col):
- if j == 0 and j == 0:
- print(int(n1[i+1][j]), int(n1[-1][j]), int(n1[i][j+1]), int(n1[i][-1]))
- #nn[i][j] = int(n1[i+1][j]) + int(n1[i-1][j]) + int(n1[i][j+1]) + int(n1[i][j-1])
- #if i != 0 and j != 0 and i != raw-1 and j != col-1:
- # nn[i][j] = int(n1[i+1][j]) + int(n1[i-1][j]) + int(n1[i][j+1]) + int(n1[i][j-1])
- print(nn)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement