题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
a = input() b = list(a)[::-1] # 直接逆序字符串a得到列表b unique_chars = set() result = [] for char in b: if char not in unique_chars: unique_chars.add(char) result.append(char) print(''.join(result))