[백준/Python] 1037번 : 약수
문제
https://www.acmicpc.net/problem/1037
풀이
어떤 수 N의 약수들이 주어지고, 이 약수들을 가지고 N의 값을 구하는 문제이다. 단순하게 배열에 담고 정렬해준 뒤 첫번째 원소와 마지막 원소를 곱해주었다.
N = int(input())
arr = sorted(list(map(int, input().split())))
print(arr[0] * arr[-1])
studio-pendant.hashnode.dev1 min read