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》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

Learning Processing

Learning Processing

Daniel Shiffman / Morgan Kaufmann / 2008-08-15 / USD 49.95

Book Description Teaches graphic artists the fundamentals of computer programming within a visual playground! Product Description This book introduces programming concepts in the context of c......一起来看看 《Learning Processing》 这本书的介绍吧!

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

在线压缩/解压 CSS 代码

MD5 加密
MD5 加密

MD5 加密工具

html转js在线工具
html转js在线工具

html转js在线工具