프로그래밍/HackerRank
[HackerRank][Python3] String Construction
snoopybox
2018. 9. 5. 00:31
Problem :
https://www.hackerrank.com/challenges/string-construction/problem
My Solution :
#!/usr/bin/env python3 for _ in range(int(input())): print(len(set(input())))
Comment :
새로운 문자열이 들어올 때만 비용이 발생하므로 unique한 character의 갯수를 세어주면 된다.