본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬]15354번 Aron

by 현장 2021. 4. 13.

-코드

t = int(input())
r = 1
color = ' '

for _ in range(t):
    c = input()
    if c != color:
        color = c
        r += 1
print(r)