链接: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相关推荐

  1. leetcode 1518 换酒问题

    https://leetcode-cn.com/problems/water-bottles/ 题目 小区便利店正在促销,用numExchangenumExchangenumExchange个空酒瓶可 ...

  2. 【手把手带你刷好题】——25.换酒问题(模拟、思维)

    [前言] 今天是刷题打卡第25天! 美好的一天从刷题开始,加油啦! 原题:换酒问题(模拟.思维) 题目描述: 小区便利店正在促销,用 numExchange 个空酒瓶可以兑换一瓶新酒.你购入了 num ...

  3. LeetCode之换酒问题(一千五百一十八)

    目录 题目 解题 方法一.暴力法 方法二.数学法 题目 (原题链接:https://leetcode-cn.com/problems/water-bottles/) 小区便利店正在促销,用 numEx ...

  4. 喝汽水问题(使用c语言解决)

    目录 问题描述 解题方法一 解题思路: 代码实现 解题方法二 解题思路: 代码实现 解题方法三 解题思路: 代码实现 总结 问题描述 喝汽水,1瓶汽水1元,2个空瓶可以换一瓶汽水,给20元,可以喝多少 ...

  5. 使用bottle进行web开发:get的参数传递,form数据传递等

    1.诸如:forum?id=1&page=5以及使用get方法这样的,在bottle里,可以通过request.query来访问这些值,举例如下: from bottle import Bot ...

  6. bottle嵌入html,css,js

    <pre name="code" class="python"># -*- coding: utf8 -*- import bottle from ...

  7. 瓶框(bottle)架学习之模版使用

    内嵌语句 只要在{{-}} 中的Python的语句返回一个字符串或有一个字符串的表达形式,它就是一个有效的语句. >>>from bottle import template > ...

  8. python bottle web框架简介

    Bottle 是一个快速,简单,轻量级的 Python WSGI Web 框架.单一文件,只依赖 Python 标准库 .bottle很适合会一点python基础的人使用,因为这框架用起来很简单,只要 ...

  9. python web 开发框架之Bottle

    最近,趁着假期,复习了一遍以前学习到的python知识,和研究新的web框架Bottle,就写了个简单的登录页面,详细可以参考官方文档http://bottle.zzir.cn/ 不废话,直接上截图和 ...

最新文章

  1. 不惧困难,阿特拉斯机器人展示超强平衡能力
  2. 四川音乐学录音艺术与计算机音乐,艺考中作曲专业和录音专业有什么不同呢?...
  3. [转]马云在《赢在中国》对创业者的经典点评
  4. 面试:说说你对 Java 中 final 的理解?
  5. 《中秋书月》月圆之夜,我和德鲁克
  6. Android的四大组件
  7. SAP Spartacus B2cStorefrontModule 和 StorefrontModule 的区别
  8. 【LOJ166】拉格朗日插值2【拉格朗日插值】【NTT卷积】
  9. 计算机考试前的心情作文,考试时的心情作文(七篇)
  10. 编码 GBK 的不可映射字符
  11. win10+anaconda3+python3.7+pytorch-cpu安装
  12. 吐血整理!必须收藏,44条代码优化细节
  13. Android View框架总结(七)View事件分发机制
  14. 调整Exchange接收连接器延迟参数解决SMTP代发送邮件问题
  15. M1 Pro 和 M1 Max MacBook Pro,我们该选择哪款MacBook
  16. AutoCAD 2004-2022 官方简体中文版下载直链
  17. unity 许可证即将到期_了解Unity即将推出。
  18. 四平方数和定理(leetcode 279 python)
  19. Linux汇编代码中加打印,汇编语言中调用C函数打印“hello world”
  20. 08-认识margin

热门文章

  1. asserted / de-asserted
  2. 本周总结and下周规划
  3. 5G PDCCH时频资源之CORESET概要
  4. 使用VirtualXposed的hook功能定位收集mac地址的代码位置
  5. 【甘道夫】Hive 0.13.1 on Hadoop2.2.0 + Oracle10g部署详细解释
  6. 怎么把位域合成一个字节_C51中位域在字节中的位置关系
  7. forever 回归啦~
  8. OpenFace简介
  9. maskedtextbox控件的使用
  10. m3u8及TS文件下载解密:m3u8文件下载及分析(三)