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

提取不重复的整数

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

JS版:
const lines = readline().split("").reverse();
const result = [];
for(let i = 0 ; i < lines.length ; i++){
const temp = lines[i];
if(result.indexOf(temp) === -1){
result.push(temp);
}
}
console.log(result.join(""));

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务