Codeforces Round 522 Div2 A. Kitchen Utensils

栏目: 编程工具 · 发布时间: 7年前

内容简介:地址: http://codeforces.com/contest/1079/problem/A英语是硬伤,这道题我看了N遍,依旧没明白。

一、题意

地址: http://codeforces.com/contest/1079/problem/A

Codeforces Round 522 Div2 A. Kitchen Utensils

英语是硬伤,这道题我看了N遍,依旧没明白。

最后反复看样例与样例说明,终于看懂了。

题意:所有人吃了 a 轮套餐,每轮套餐有 b 个餐具。每轮套餐所有人吃的都一样。

由于有些人偷走了一下餐具,计算最少有多少个餐具。

二、分析

输入是每个餐具剩余的个数 left 和人数 k 。

根据餐具的最大个数,可以计算出最少吃了几轮套餐 loopNum = max(b) / k

计算出餐具总是: allB = loopNum * k * b

被偷走的餐具: allB - left

Codeforces Round 522 Div2 A. Kitchen Utensils

本文首发于公众号:天空的代码世界,微信号:tiankonguse-code。


以上所述就是小编给大家介绍的《Codeforces Round 522 Div2 A. Kitchen Utensils》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

The Sovereign Individual

The Sovereign Individual

James Dale Davidson、William Rees-Mogg / Free Press / 1999-08-26 / USD 16.00

Two renowned investment advisors and authors of the bestseller The Great Reckoning bring to light both currents of disaster and the potential for prosperity and renewal in the face of radical changes ......一起来看看 《The Sovereign Individual》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

SHA 加密
SHA 加密

SHA 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具