반응형
Notice
Recent Posts
Recent Comments
Link
«   2024/11   »
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
Archives
Today
Total
11-07 11:40
관리 메뉴

ImJay

[파이썬/Python] 백준 21300번 Bottle Return 본문

Solved.ac - Python/Bronze V

[파이썬/Python] 백준 21300번 Bottle Return

ImJay 2022. 11. 28. 12:37
반응형

[파이썬/Python] 백준 21300번 Bottle Return

 

21300번: Bottle Return

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 differe

www.acmicpc.net


문제

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).

 

해설

beverage container deposit laws ... rules are very simple: there is a 5¢ deposit for containers.

음료 용기 예치금 법이 존재하는데, 규칙은 어떤 용기든 5센트를 받는다.

 

코드

bottle = map(int, input().split())

print(sum(bottle)*5)

풀이

1. 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.

6 종류의 음료 용기를 리스트 bottle로 입력 받는다.

bottle = map(int, input().split())

 

2. The output consists of a single line that contains a single integer representing the total refund the customer should get in cents.

지불 금액을 출력한다.

지불 금액 = 모든 용기의 합 * 5센트

print(sum(bottle)*5)

 

반응형
Comments