22164_C(n,m)again

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

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

Pro.ID

22164

Title

C(n, m) again

Title链接

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

AC

0

Submit

2

Ratio

0.00%

时间&空间限制

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

    This is a classical problem. Your job is to calculate the combination formula , since n, m and C(n, m) fit a 64-bit unsigned integer.

    输入

    The first line of input there is one integer T ( T ≤ 100 ), giving the number of test cases in the input. Each test case contains a line with two integer n and m ( 0 ≤ mn < 264 ).

    输出

    Description

    This is a classical problem. Your job is to calculate the combination formula , since n, m and C(n, m) fit a 64-bit unsigned integer.

    Input

    The first line of input there is one integer T ( T ≤ 100 ), giving the number of test cases in the input. Each test case contains a line with two integer n and m ( 0 ≤ mn < 264 ).

    Output

    For each case, output the answer C(n, m) corresponding to the input.

    Sample Input

    1
    4 2

    Sample Output

    6

    Source

    样例输入

    1
    4 2

    样例输出

    6

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部