-코드
t = int(input())
r = 1
color = ' '
for _ in range(t):
c = input()
if c != color:
color = c
r += 1
print(r)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬]13073번 Sums (0) | 2021.04.13 |
---|---|
[백준/파이썬]16861번 Harshad Numbers (0) | 2021.04.13 |
[백준/파이썬]11131번 Balancing Weights (0) | 2021.04.13 |
[백준/파이썬]2751번 수 정렬하기 2 (0) | 2021.04.12 |
[백준/파이썬]11522번 Sum Kind of Problem (0) | 2021.04.12 |