[파이썬/python] 백준 1037번 : 약수(🥉1)

n=int(input())
nn=list(map(int,input().split()))
print(max(nn)*min(nn))

간단간단

예를 들어 12의 약수인 [1,2,3,4,6,12]가 있고 양 끝에서부터 서로 곱하면 12가 나온다

이것을 이용해서 풀었다

 

comment