import Foundation var count = 0 var set: Set<Int> = [] while let line = readLine() { if line.isEmpty { break } if (count == 0) { count = Int(line) ?? 0 }else { set.insert(Int(line) ?? 0) } } var arr = Array(set).sorted(by: <) arr.map{ x in ...