-
[백준] 1037 - 약수 (python)Problem Solving/Python 2023. 7. 7. 16:19반응형
1037번: 약수
첫째 줄에 N의 진짜 약수의 개수가 주어진다. 이 개수는 50보다 작거나 같은 자연수이다. 둘째 줄에는 N의 진짜 약수가 주어진다. 1,000,000보다 작거나 같고, 2보다 크거나 같은 자연수이고, 중복되
www.acmicpc.net
포인트
N의 진짜 약수가 모두 주어지고 이 중에 1과 N은 없다는 단서가 있다.
그렇기 때문에 주어지는 약수 중 가장 작은 값과 가장 큰 값을 곱하면 N이 된다. 별 거 없다. 그냥 문제 문장이 이상한 유형..
코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersn = int(input()) numbers = list(map(int, input().split())) print(min(numbers) * max(numbers)) 반응형'Problem Solving > Python' 카테고리의 다른 글
[백준] 1076 - 저항 (python) (0) 2023.07.10 [백준] 1075 - 나누기 (python) (0) 2023.07.10 [백준] 1032 - 명령 프롬프트 (python) (0) 2023.07.07 [백준] 1018 - 체스판 다시 칠하기 (python) (0) 2023.07.07 [백준] 1012 - 유기농 배추 (dfs 풀이) (python) (0) 2023.07.07