题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
a = int(input()) b = str(a) length = len(b) L = [] for i in range(length-1,-1,-1): c = int(a / (10**i)) a = a - c * (10**i) L.append(c) L.reverse() L2 = [] for i in L: if i not in L2: L2.append(i) n = len(L2)-1 ans = 0 for i in L2: ans += i * (10**n) if n >= 0: n -= 1 print(ans)