https://www.acmicpc.net/problem/25858
1
2
3
4
5
6
7
8
|
if __name__ == '__main__':
n_students, total_prize = map(int, input().split())
n_problems = [int(input()) for i in range (n_students)]
total_problem = sum(n_problems)
problem_per_prize = total_prize/total_problem
for i in n_problems:
print(int(i*problem_per_prize))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 25881 Electric Bill (0) | 2022.11.29 |
---|---|
백준 25983 Majestic 10 (0) | 2022.11.29 |
백준 25991 Lots of Liquid (0) | 2022.11.29 |
백준 26068 치킨댄스를 추는 곰곰이를 본 임스 2 (0) | 2022.11.29 |
백준 11586 지영 공주님의 마법 거울 (0) | 2022.11.29 |
댓글