func solution(_ n:Int) -> Int {
var answer = 0
if n == 0 {
return 0
}
for i in 1...n {
if n % i == 0 {
answer += i
} else {
continue
}
}
return answer
}
func solution(_ n:Int) -> Int {
guard n != 0 else {
return 0
}
return Array(1...n).filter{n % $0 == 0}.reduce(0, +)
}