회고
풀이
https://school.programmers.co.kr/learn/courses/30/lessons/87389
풀이1
def solution(n):
answer = 0
while answer <= n:
answer += 1
if n % answer == 1:
return answer
풀이2
def solution(n):
answer = [i for i in range(1, n+1) if n % i == 1][0]
return answer
풀이3
def solution(n):
answer = 0
while answer <= n:
answer += 1
if n % answer == 1:
return answer