문제 링크입니다: www.acmicpc.net/problem/21300
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
간단한 구현 문제였습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
const int MAX = 6; | |
const int PRICE = 5; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
int sum = 0; | |
for (int i = 0; i < MAX; i++) | |
{ | |
int num; | |
cin >> num; | |
sum += num; | |
} | |
cout << sum * PRICE << "\n"; | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 2052번 지수연산 (0) | 2021.04.09 |
---|---|
백준 1975번 Number Game (0) | 2021.04.09 |
백준 1952번 달팽이2 (2) | 2021.04.07 |
백준 1942번 디지털시계 (2) | 2021.04.06 |
백준 1864번 문어 숫자 (0) | 2021.04.06 |