找一缕阳光呀 2017-07-23 03:14 采纳率: 93.3%
浏览 894
已采纳

这道题翻译过来什么意思啊,我怎么翻译都不通顺

Tom has many cigarettes. We hypothesized that he has n cigarettes and smokes them

one by one keeping all the butts. Out of k > 1 butts he can roll a new cigarette.
Now,do you know how many cigarettes can Tom has?

输入
First input is a single line,it's n and stands for there are n testdata.then there are n lines ,each line contains two integer numbers giving the values of n and k.
输出
For each line of input, output one integer number on a separate line giving the maximum number of cigarettes that Peter can have.

  • 写回答

1条回答 默认 最新

  • 战在春秋 2017-07-23 06:32
    关注

    汤姆有许多香烟,假设刚开始有n支香烟,汤姆一支接一支的抽并将烟头留下。
    并假设k个烟头(k>1)又能合成一支香烟。
    请问汤姆一共有多少支香烟?

    输入:
    第一行输入n的值,代表要测试几组数据。
    之后输入n行数,每一行有两个整数,分别代表最开始的香烟数以及k的值。
    比如:

    2       //要测试三组数据
    10 3 //一开始有10支,3个烟头可以合成一只香烟
    12 5 //一开始有12支,5个烟头可以合成一只香烟
    

    输出:
    输出n行结果,分别对应输入的n组数。
    每一行为一个整数值,代表汤姆能拥有的最大香烟数。
    比如:

    18  //对应第一组输入的结果
    16  //对应第二组输入的结果
    

    说明:结果是我随意填的,不一定是这个数。主要是翻译这个题目。

    如果对您有帮助,请采纳答案好吗,谢谢!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败