순서쌍의 개수
1에서 n까지의 요소 중 n에 나누었을 때 나머지가 0인 요소들이 몇 개인지 구해준다.
import Foundation func solution(_ n:Int) -> Int { (1...n).filter { n % $0 == 0 }.count }