1.23题目翻译

题目链接:“蓝桥杯”练习系统

原题

George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had originally and how long they were originally. Please help him and design a program which computes the smallest possible original length of those sticks. All lengths expressed in units are integers greater than zero.

输入格式

The input contains blocks of 2 lines. The first line contains the number of sticks parts after cutting, there are at most 64 sticks. The second line contains the lengths of those parts separated by the space. The last line of the file contains zero.

输出格式

The output should contains the smallest possible length of original sticks, one per line.

翻译:

乔治拿起同样长度的棍子,随意切割,直到所有的部分最多变成50个单位长。现在他想让棍子回到原来的状态,但他忘记了他有多少根棍子 以及它们最初的生长时间。请帮助他设计一个程序,计算这些棒的最小的原始长度。所有以单位表示的长度都是整数 r大于零。

输入包含由2行组成的块。第一行包含切割后的数量,最多有64根。第二行包含了由th分隔的那些部分的长度 e空间。该文件的最后一行包含零。

输出应该包含尽可能小的原始棒的长度,每行一条。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值