题解 | #明明的随机数#
明明的随机数
http://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
function dealRandamData(){ let N = readline(); let obj = {}; for(let i = 0;i < Number(N);i++){ let n = readline(); obj[n] = 1; } let array = Object.keys(obj); return array.sort(function(a,b){ return a - b; }); } let array = dealRandamData(); for(let i = 0;i < array.length;i ++){ console.log(array[i]); }