题解 | #提取不重复的整数#
提取不重复的整数
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(){ const str = await readline(); const set = new Set(); const len = str.length; let res = ""; for(let i = len-1; i >= 0; i--){ const c = str.charAt(i); if(!set.has(c)) res += c; set.add(c); } console.log(res); }()