def solution(n, m):
a, b = n, m
while m != 0:
result = m
n, m = m, n % m
answer = [result, int(a*b/result)]
return answer
'Coding Test > Programmers_Python' 카테고리의 다른 글
[프로그래머스/python] 핸드폰 번호 가리기 (0) | 2020.07.09 |
---|---|
[프로그래머스/python] 자연수 뒤집어 배열로 만들기 (0) | 2020.07.09 |
[프로그래머스/python] 문자열 다루기 기본 (0) | 2020.07.08 |
[프로그래머스/python] 행렬의 덧셈 (0) | 2020.07.08 |
[프로그래머스/python] 하샤드 수 (0) | 2020.07.08 |