21610_SellTicke

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

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

Pro.ID

21610

Title

Sell Ticket

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    One day, little pig wants to go to the park for fun. He has just one piece of five dollar and luckily the park sells the ticket for five dollar.

    When he got to the park, there are 2n people waited in one line for ticket. And just by chance, there were n people have one piece of ten dollar and n people has one piece of five dollar (not include little pig).

    The little pig watched the park seller to sell tickets and after a while, 2n people got their tickets and by another chance, all the people who had 10 dollar had their charge and the seller didn't use their park's charge!

    Little pig wanted to know how many kinds of permutation that these 2n people formed?

    输入

    There are multiply test cases in this problem. One integer n ( 1 ≤ n ≤ 30 ) in one line.

    The input will be terminated by n=0.

    输出

    Description

    One day, little pig wants to go to the park for fun. He has just one piece of five dollar and luckily the park sells the ticket for five dollar.

    When he got to the park, there are 2n people waited in one line for ticket. And just by chance, there were n people have one piece of ten dollar and n people has one piece of five dollar (not include little pig).

    The little pig watched the park seller to sell tickets and after a while, 2n people got their tickets and by another chance, all the people who had 10 dollar had their charge and the seller didn't use their park's charge!

    Little pig wanted to know how many kinds of permutation that these 2n people formed?

    Input

    There are multiply test cases in this problem. One integer n ( 1 ≤ n ≤ 30 ) in one line.

    The input will be terminated by n=0.

    Output

    Print one integer in one line which is the number of permutation.

    Sample Input

    2
    0

    Sample Output

    2

    Hint

    For the sample Input, The possible permutation will be:

    5 5 10 10

    5 10 5 10

    Source

    样例输入

    2
    0

    样例输出

    2

    提示

    For the sample Input, The possible permutation will be:

    5 5 10 10

    5 10 5 10


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部