Closed ji-0630 closed 1 year ago
for i in a:
while n%i==0:
if i not in answer:
answer.append(i)
n=n//i
def solution(n):
answer = []
i = 2
while (n != 1):
if n % i == 0:
n = n//i
answer.append(i)
else:
i += 1
return sorted(list(set(answer)))
문제 설명