https://www.acmicpc.net/problem/2217
BOJ 2217 - 로프
작성언어: Python3
n = int(input())ans = 0rope_list = []for i in range(n): rope_list.append(int(input()))rope_list.sort()for i in range(0, len(rope_list)): ans = max(ans, rope_list[i]*(n-i))print(ans)pc 환경에서 코드를 보는 것을 권장합니다.
'알고리즘 문제 풀기 > BOJ' 카테고리의 다른 글
| BOJ 2875 - 대회 or 인턴 (0) | 2020.03.25 |
|---|---|
| BOJ 10610 - 30 (0) | 2020.03.18 |
| BOJ 5585 - 거스름돈 (0) | 2020.03.16 |
| BOJ 1541 - 잃어버린 괄호 (0) | 2019.12.27 |
| BOJ 11399 - ATM (0) | 2019.12.26 |