iOS 개발 공부

[Swift] 정수 내림차순으로 배치하기 본문

프로그래머스/Lv.1

[Swift] 정수 내림차순으로 배치하기

물복딱복준복 2023. 2. 16. 22:46
import Foundation

func solution(_ n:Int64) -> Int64 {
    return Int64(String(String(n).sorted{ $0 > $1 }))!
}