Skip to content

Commit f6b329a

Browse files
committed
약수의 합
1 parent f8aa813 commit f6b329a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

programmers/약수의 합.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def solution(n):
2+
answer = 0
3+
리스트 = []
4+
5+
for i in range(1, n+1):
6+
if n % i == 0:
7+
리스트.append(i)
8+
9+
for i in range(len(리스트)):
10+
answer += 리스트[i]
11+
return answer

0 commit comments

Comments
 (0)