Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- L=[]
- for i in range(200):
- L.append(list(map(int,input().split())))
- print(L)
- print(len(L))
- sasiedzi=0
- for y in range(200):
- for x in range(320):
- pos=0
- if 0<x and abs(L[y][x]-L[y][x-1]) > 128: pos=1
- if x<319 and abs(L[y][x]-L[y][x+1]) > 128: pos=1
- if 0<y and abs(L[y][x]-L[y-1][x]) > 128: pos=1
- if y <199 and abs(L[y][x]-L[y+1][x]) > 128: pos=1
- sasiedzi+=pos
- print(sasiedzi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement