题解 | #明明的随机数#
明明的随机数
https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
const rl = require("readline").createInterface({ input: process.stdin }); var iter = rl[Symbol.asyncIterator](); const readline = async () => (await iter.next()).value; void async function () { // map的键 // Write your code here let N = parseInt(await readline()); // let numN = []; let map = new Map(); while(line = await readline()){ let num = parseInt(line); map.set(num, (map.get(num) || 0) + 1); } let res = Array.from(map.keys()).sort((a,b)=> a-b); for(let i = 0; i<res.length; i++) console.log(res[i]); }()