题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void async function () {
// Write your code here
while(line = await readline()){
const a = [];
const b = line.split('').reverse();
for (let i = 0; i < b.length; i++){
if (a.indexOf(b[i]) === -1){
a.push(b[i])
}
}
console.log(a.join(''))
}
}()
查看5道真题和解析