题解 | #提取不重复的整数#

提取不重复的整数

http://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1

题目要求从右向左读,利用字符串分隔特性,先把字符串逆序,然后for循环处理就行。


str = raw_input()
out=""
for i in str[::-1]:
    if out.count(i) == 0:
        out = out + i
print out        

全部评论

相关推荐

点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
03-20 12:46
瘦嘟嘟右卫门:百度文库网盘的暑期也没约面吗
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务