# 약수의 합

def solution(n):
    answer = 0
    for i in range(1,n+1):
        if n%i == 0:
            answer+=i
    return answer

 

# 행렬의 덧셈

def solution(arr1, arr2):
    answer = [[] for i in range(len(arr1))]
    for i in range(len(arr1)):
        for j in range(len(arr1[i])):
            answer[i].append(arr1[i][j]+arr2[i][j])
    return answer

 

반응형

+ Recent posts