N = int(input())
cnt = N
for i in range(N):
word = input()
for j in range(0, len(word)-1): #인덱스 범위 생성:0부터 단어개수 -1까지
if word[j] == word[j+1]: #앞 뒤 문자가 같은경우
pass
elif word[j] in word[j+1:]: #앞에 그 문자가 있는지 체크
cnt -= 1
break
print(cnt)
'공부 > 알고리즘, 백준' 카테고리의 다른 글
백준 1946번 파이썬 (0) | 2023.01.12 |
---|---|
백준 1712번 파이썬 (0) | 2023.01.02 |
백준 2884번 파이썬 (0) | 2023.01.02 |
백준 2480번 파이썬 (0) | 2023.01.02 |
백준 2753번 파이썬 (0) | 2023.01.02 |