Advertisement
juxtapositions

Untitled

Nov 13th, 2021
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. n=int(input())
  2. mas=[]
  3. count=0
  4. for i in input().split():
  5.     mas.append(int(i))
  6. for i in range(0,n-1):
  7.     if mas[i]!=mas[i+1]:
  8.         count+=1
  9. print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement