#abc208f. [abc208_f]Cumulative Sum
[abc208_f]Cumulative Sum
Problem Statement
For non-negative integers and , let us define the function as follows, using a positive integer .
$\\displaystyle f(n, m) = \\begin{cases} 0 & (n = 0) \\\\ n^K & (n \\gt 0, m = 0) \\\\ f(n-1, m) + f(n, m-1) & (n \\gt 0, m \\gt 0) \\end{cases}$
Given , , and , find modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print modulo .
Sample Input 1
3 4 2
Sample Output 1
35
When , the values for are as follows.
Sample Input 2
0 1 2
Sample Output 2
0
Sample Input 3
1000000000000000000 30 123456
Sample Output 3
297085514