Programming/Python & Data Structures
[Baekjoon/Python3] 7600번 문자가 몇갤까
HooNeee
2020. 12. 5. 22:01
[Baekjoon/Python3] 7600번 문자가 몇갤까
7600번: 문자가 몇갤까
각 줄마다 출몰한 알파벳의 개수를 출력하면 된다.
www.acmicpc.net
alp = [chr(i) for i in range(65, 91)]
while True:
tot = 0
s = input().upper()
if s == '#':
break
else:
s = set(s)
for i in s:
if i in alp:
tot += 1
print(tot)