Notice
Recent Posts
Recent Comments
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 데이콘
- 백준
- Real or Not? NLP with Disaster Tweets
- 캐치카페
- 편스토랑
- 프로그래머스
- programmers
- 자연어처리
- 코로나19
- AI 경진대회
- github
- ubuntu
- Docker
- SW Expert Academy
- leetcode
- 더현대서울 맛집
- 우분투
- Git
- dacon
- Kaggle
- ChatGPT
- gs25
- 금융문자분석경진대회
- hackerrank
- 맥북
- Baekjoon
- 프로그래머스 파이썬
- 파이썬
- 편스토랑 우승상품
- PYTHON
Archives
- Today
- Total
솜씨좋은장씨
[BaekJoon] 21300번 : Bottle Return (Python) 본문
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 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
👨🏻💻 코드 ( Solution )
def caculate_money(bottle_num, fee):
return bottle_num * fee
def bottle_return(bottle_list, fee_list):
deposit_list = [(bottle_num * fee) for bottle_num, fee in zip(bottle_list, fee_list)]
return sum(deposit_list)
if __name__ == "__main__":
bottle_list = list(map(int, input().split()))
fee_list = [5] * len(bottle_list)
total_deposit = bottle_return(bottle_list, fee_list)
print(total_deposit)
GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
| [BaekJoon] 15726번 : 이칙연산 (Python) (0) | 2022.05.29 |
|---|---|
| [BaekJoon] 24568번 : Cupcake Party (Python) (0) | 2022.05.28 |
| [BaekJoon] 20254번 : Site Score (Python) (0) | 2022.05.26 |
| [BaekJoon] 24736번 : Football Scoring (Python) (0) | 2022.05.25 |
| [BaekJoon] 1964번 : 오각형, 오각형, 오각형... (Python) (0) | 2022.05.24 |
Comments