def solution(n):
sum = 0
for i in range(1,n//2+1):
if n%i==0: sum += i
return sum + n
function solution(n) {
var answer = 0;
for(var i=1; i<=n/2; i++){
if (n%i==0) answer += i;
}
return answer + n;
}
def solution(n):return n + sum([i for i in range(1,n//2+1) if n%i==0])