题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
s=input()
s=s[::-1]
r=''
for c in s:
if c not in r:
r+=c
print(r)
处理字符串,遍历每个字符,如果该字符在结果字符串里,什么也不做,如果不在,则拼到结果字符串里。
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
s=input()
s=s[::-1]
r=''
for c in s:
if c not in r:
r+=c
print(r)
处理字符串,遍历每个字符,如果该字符在结果字符串里,什么也不做,如果不在,则拼到结果字符串里。
相关推荐