字符串中不同字符的个数即为最小循环节。
while True: try: s = input() lst = [] for i in s: if i not in lst: lst.append(i) print(len(lst)) except: break
字符串中不同字符的个数即为最小循环节。
while True: try: s = input() lst = [] for i in s: if i not in lst: lst.append(i) print(len(lst)) except: break