import Foundation
func solution(_ order:Int) -> Int {
String(order).filter {$0 == "3" || $0 == "6" || $0 == "9"}.count
}
'프로그래머스 > Lv.0' 카테고리의 다른 글
[Swift] 가위 바위 보 (0) | 2022.12.13 |
---|---|
[Swift] 가까운 수 (0) | 2022.12.13 |
[Swift] 7의 개수 (0) | 2022.12.13 |
[Swift] 2차원으로 만들기 (0) | 2022.12.13 |
[Swift] 평행 (0) | 2022.12.13 |