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
#include<iostream>
using namespace std;
int main(){int a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;cout<<(a+b+c+d+e+f)*5;
}
A Bottle Return相关推荐
- leetcode 1518 换酒问题
https://leetcode-cn.com/problems/water-bottles/ 题目 小区便利店正在促销,用numExchangenumExchangenumExchange个空酒瓶可 ...
- 【手把手带你刷好题】——25.换酒问题(模拟、思维)
[前言] 今天是刷题打卡第25天! 美好的一天从刷题开始,加油啦! 原题:换酒问题(模拟.思维) 题目描述: 小区便利店正在促销,用 numExchange 个空酒瓶可以兑换一瓶新酒.你购入了 num ...
- LeetCode之换酒问题(一千五百一十八)
目录 题目 解题 方法一.暴力法 方法二.数学法 题目 (原题链接:https://leetcode-cn.com/problems/water-bottles/) 小区便利店正在促销,用 numEx ...
- 喝汽水问题(使用c语言解决)
目录 问题描述 解题方法一 解题思路: 代码实现 解题方法二 解题思路: 代码实现 解题方法三 解题思路: 代码实现 总结 问题描述 喝汽水,1瓶汽水1元,2个空瓶可以换一瓶汽水,给20元,可以喝多少 ...
- 使用bottle进行web开发:get的参数传递,form数据传递等
1.诸如:forum?id=1&page=5以及使用get方法这样的,在bottle里,可以通过request.query来访问这些值,举例如下: from bottle import Bot ...
- bottle嵌入html,css,js
<pre name="code" class="python"># -*- coding: utf8 -*- import bottle from ...
- 瓶框(bottle)架学习之模版使用
内嵌语句 只要在{{-}} 中的Python的语句返回一个字符串或有一个字符串的表达形式,它就是一个有效的语句. >>>from bottle import template > ...
- python bottle web框架简介
Bottle 是一个快速,简单,轻量级的 Python WSGI Web 框架.单一文件,只依赖 Python 标准库 .bottle很适合会一点python基础的人使用,因为这框架用起来很简单,只要 ...
- python web 开发框架之Bottle
最近,趁着假期,复习了一遍以前学习到的python知识,和研究新的web框架Bottle,就写了个简单的登录页面,详细可以参考官方文档http://bottle.zzir.cn/ 不废话,直接上截图和 ...
最新文章
- 不惧困难,阿特拉斯机器人展示超强平衡能力
- 四川音乐学录音艺术与计算机音乐,艺考中作曲专业和录音专业有什么不同呢?...
- [转]马云在《赢在中国》对创业者的经典点评
- 面试:说说你对 Java 中 final 的理解?
- 《中秋书月》月圆之夜,我和德鲁克
- Android的四大组件
- SAP Spartacus B2cStorefrontModule 和 StorefrontModule 的区别
- 【LOJ166】拉格朗日插值2【拉格朗日插值】【NTT卷积】
- 计算机考试前的心情作文,考试时的心情作文(七篇)
- 编码 GBK 的不可映射字符
- win10+anaconda3+python3.7+pytorch-cpu安装
- 吐血整理!必须收藏,44条代码优化细节
- Android View框架总结(七)View事件分发机制
- 调整Exchange接收连接器延迟参数解决SMTP代发送邮件问题
- M1 Pro 和 M1 Max MacBook Pro,我们该选择哪款MacBook
- AutoCAD 2004-2022 官方简体中文版下载直链
- unity 许可证即将到期_了解Unity即将推出。
- 四平方数和定理(leetcode 279 python)
- Linux汇编代码中加打印,汇编语言中调用C函数打印“hello world”
- 08-认识margin