[Swift] ๋ฐฑ์ค1181
ยท
๐ ์ฝํ
/BOJ
import Foundation let n = Int(readLine()!)! var arr = [String]() for _ in 0 ..< n { let input = readLine()! arr.append(input) } // ์ค๋ณต์ ๊ฑฐ arr = Array(Set(arr)) // ๊ธธ์ด์ฌ์ ์ + ์งง์ ์ arr = arr.sorted(by: { $0 < $1 }).sorted(by: { $0.count < $1.count }) for string in arr { print(string) }