21087_Lenny’sLuckyLottoLists

2022-5-16 18:18| 发布者: Hocassian| 查看: 48| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-89504822819100-Problem List-采集的数据-后羿采集器.html

Pro.ID

21087

Title

Lenny’s Lucky Lotto Lists

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21087

AC

0

Submit

238

Ratio

0.00%

时间&空间限制

  • Time Limit: 1500/500 MS (Java/Others)     Memory Limit: 131072/65536 K (Java/Others)
  • 描述

    Lotto is a lottery, typically with an accumulating jackpot, in which participants play numbers of their choice in a random drawing. Lenny likes to play the lotto in Lincoln county Louisiana. In the game, he picks a list of n numbers in the range from 1 to m. If his list matches the drawn list, he wins the big prize, a lifetime supply of large lemons.
    Lenny has a scheme that he thinks is likely to be lucky. He likes to choose his list so that each number in it is at least twice as large as the one before it. So, for example, if n = 4 and m = 10, then the possible lucky lists Lenny could like are:
    1 2 4 8
    1 2 4 9
    1 2 4 10
    1 2 5 10
    Thus Lenny has 4 lists to choose from.
    Your job, given n and m, is to count how many lucky lists Lenny has to choose from.

    输入

    The first line of input is a single non-negative integer, which is the number of data sets to follow. All data sets should be handled identically.
    The next lines, one per data set, contain two integers, n and m. You are guaranteed that 1 <= n <= 10 and 1 <= m <= 2000 and n <= m.

    输出

    Description
    Lotto is a lottery, typically with an accumulating jackpot, in which participants play numbers of their choice in a random drawing. Lenny likes to play the lotto in Lincoln county Louisiana. In the game, he picks a list of n numbers in the range from 1 to m. If his list matches the drawn list, he wins the big prize, a lifetime supply of large lemons.
    Lenny has a scheme that he thinks is likely to be lucky. He likes to choose his list so that each number in it is at least twice as large as the one before it. So, for example, if n = 4 and m = 10, then the possible lucky lists Lenny could like are:
    1 2 4 8
    1 2 4 9
    1 2 4 10
    1 2 5 10
    Thus Lenny has 4 lists to choose from.
    Your job, given n and m, is to count how many lucky lists Lenny has to choose from.
    Input
    The first line of input is a single non-negative integer, which is the number of data sets to follow. All data sets should be handled identically.
    The next lines, one per data set, contain two integers, n and m. You are guaranteed that 1 <= n <= 10 and 1 <= m <= 2000 and n <= m.
    Output
    For each data set, print a line like the following:
    Data set i: n m number
    where i is the data set number (beginning with 1), and number is the maximum number of lucky lists corresponding to the provided values of n and m.
    Sample Input
    1
    4 10
    Sample Output
    Data set 1: 4 10 4
    Source

    样例输入

    1
    4 10

    样例输出

    Data set 1: 4 10 4

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部