题解 | #明明的随机数#
明明的随机数
https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
package main import ( "fmt" "bufio" "os" "strconv" ) func main() { scanner:=bufio.NewReader(os.Stdin) in,_,_:=scanner.ReadLine() if len(in)!=0{ count, _:=strconv.Atoi(string(in)) mark:=[1000]bool{} for i:=0;i<count;i++{ number,_,_:=scanner.ReadLine() n,_:=strconv.Atoi(string(number)) mark[n]=true } for k,v:=range mark{ if v==true{ fmt.Println(k) } } } }