https://www.acmicpc.net/problem/21300
문제
In the United States, beverage container deposit laws, or so-called bottle bills, are designed to reduce litter and reclaim bottles, cans and other containers for recycling. Ten states currently have some sort of deposit-refund systems in place for different types of beverage containers. These deposit amounts vary from 2¢ to 15¢ per container, depending on the type and volume of the container. For example, Oregon charges a (refundable) deposit of 2¢ per refillable container, and 10¢ for all others (with exceptions).
For this problem you will calculate the amount a customer will get refunded for a given collection of empty containers in the state of New York. New York’s rules are very simple: there is a 5¢ deposit for containers of any size less than one gallon containing beer, malt, wine products, carbonated soft drinks, seltzer and water (that does not contain sugar).
입력
Input consists of a single line containing 6 space separated integer values representing the number of empty containers of beer, malt, wine products, carbonated soft drinks, seltzer and water. Each value will be in the range [0, 100].
출력
The output consists of a single line that contains a single integer representing the total refund the customer should get in cents.
예제 입력 1
0 0 0 23 3 100
예제 출력 1
630
# 뉴욕은 모든 쓰레기에 대해서 5씩 지불해야 한다.
# 6개 종류의 쓰레기에 대한 갯수를 입력 받을 때,
# 지불해야 하는 총 금액을 출력하라.
num = list(map(int, input().split()))
total = 0
for i in range(len(num)):
total += num[i] * 5
print(total)
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 2108] 통계학 (python) (0) | 2021.11.29 |
---|---|
[백준, BOJ 22193] Multiply (python) (0) | 2021.11.29 |
[백준, BOJ 20492] 세금 (python) (0) | 2021.11.28 |
[백준, BOJ 20254] Site Score (python) (0) | 2021.11.28 |
[백준, BOJ 18301] Rats (python) (0) | 2021.11.28 |