Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n=int(input())
- mas=[]
- count=0
- for i in input().split():
- mas.append(int(i))
- for i in range(0,n-1):
- if mas[i]!=mas[i+1]:
- count+=1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement