Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 파이썬
- python
- UE5
- w3school
- 재귀
- W3Schools
- Basic
- guide
- dfs
- Unity
- 문제풀이
- 오류
- 백준
- DP
- 기초
- 프로그래밍
- Class
- Tutorial
- 시작해요 언리얼 2022
- c++
- dynamic
- Material
- Algorithm
- Unreal Engine 5
- github
- loop
- Programming
- parameter
- String
- C#
Archives
- Today
- Total
목록11399 (1)
행복한 개구리
n = int(input()) time = list(map(int, input().split())) time.sort() result = 0 for i in range(n): result += time[i] * (n-i) print(result) 문제의 본문을 봤을때, 시간의 합은 5P₁ + 4P₂ + 3P₃ + 2P₄ + P₅ 입니다. 따라서 가장 시간이 적게 걸리는 사람부터 시작해야합니다. 입력받은 리스트를 정렬해줍니다. 리스트를 반복문을 통해서 시간의 합을 구합니다.
Algorithm/BaekJoon
2022. 3. 5. 13:11