import Foundation
func solution(_ n:Int, _ numlist:[Int]) -> [Int] {
return numlist.filter { $0 % n == 0 }
}
'프로그래머스 > Lv.0' 카테고리의 다른 글
[Swift] OX퀴즈 (0) | 2023.02.10 |
---|---|
[Swift] k의 개수 (0) | 2023.02.10 |
[Swift] 구슬을 나누는 경우의 수 (0) | 2023.02.10 |
[Swift] 숨어있는 숫자의 덧셈 (1) (0) | 2023.02.10 |
[Swift] A로 B 만들기 (0) | 2023.02.08 |