logo AlgoBeat OnlineJudge
登录 注册

#215762. [JAG 2023 Summer Camp #2] Sum of Product of Binomial Coefficients

内存限制:1024 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

You are given integers and . For a positive integer , is defined as follows.

  • The sum of for all integer sequences that satisfy the condition .

Answer the remainder of divided by .

For each input, solve test cases.

Note that represents "the number of ways to select distinct items from items" (i.e., the binomial coefficient).

输入格式

Each test case is given in the following format.

The input satisfies the following constraints.

  • All test cases consist of integers.
  • The sum of in one test case does not exceed .

输出格式

Output the remainder of divided by for each test case.

样例

样例输入 1

3
3 3
0 1
31415 92653

样例输出 1

99
1
276482222