취준시절/백준

[백준 1316] 그룹 단어 체커 - Python

MAYMIN 2021. 8. 4. 02:02
728x90
SMALL
n = int(input())
for _ in range(n):
    word = str(input())
    for i in range(len(word)-1):
        if word[i]!=word[i+1]:
            if word[i] in word[i+1:]:
                n-=1
                break
print(n)
728x90
LIST