题解 | #明明的随机数#
明明的随机数
https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
应该利用对象的key
let n = +readline(); let obj = {}; for(let i = 0; i < n; i++) { let num = readline(); if(!obj[num]) { obj[num] = true; } } for(let key in obj) { console.log(key); }