본문 바로가기
Algorithm

[구현/수학] 백준 21300 Bottle Return - 파이썬(Python)

by jangThang 2022. 7. 5.
반응형

백준 온라인 저지

 

[ Contents ]

     

     

    1. 문제 (링크 참조)

     

    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

     

     

     

    2. 문제 풀이

     병의 개수를 세고, 1개당 5갤런씩 계산합니다. 병의 종류는 상관 없습니다.

     

     

     

    3. 코드

    import sys
    input = sys.stdin.readline
    
    # 입력
    numlist = list(map(int, input().split()))
    
    # 출력
    print(sum(numlist)*5)

     

     

    star가 되고나서 Tistory

    반응형

    댓글