A. Bottle Return

链接:https://ac.nowcoder.com/acm/contest/18462/A
来源:牛客网

题目描述
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
输出
复制
630
题解:本题是完全的水题,对于给出的六个数字的输入只要进行相关的累加后乘以5即可,本题已求解。
代码:

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int f[6];
	int sum=0;
	for(int i=0;i<6;i++)
	   {
	   	cin>>f[i];
	   	sum+=f[i];
	   }
	sum*=5;
	cout<<sum<<endl;
	return 0;
} 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值