백준-1316

Seogyu Gim·2020년 11월 24일
0

코딩테스트

목록 보기
1/47
num = int(input())
all_words = [list(input()) for n in range(num)]
result = 0


for n in range(num):
  used = []
  words = all_words[n]
  check = True
  for i in range(len(words)):
    if i > 0 and words[i] in used and words[i] != words[i-1]:
      check = False
      break
    used.append(words[i])
  if check == True:
    result += 1
    

print(result)
profile
의미 있는 일을 하고싶은 개발자

0개의 댓글

관련 채용 정보

Powered by GraphCDN, the GraphQL CDN