#P7609. [2018年杭电多校]sacul
[2018年杭电多校]sacul
sacul
Problem Description
Patrick Star found a kind of magical matrixs, he named them !!! We use to express the -th prime number. The size of is ! What is more surprising is that :
- For any , the element on the i-th row j-th column = ? : .
- Where is count of method to choose balls (unordered) from balls which are pairwise distinct.
- Note that rows and columns both count from zero. Patrick Star defined the sum of all elements of , $F[n][k] = \sum_{i = 0}^{p^n-1}\sum_{j=0}^{p^n-1}HMBB_n^k[i][j]$ Now Patrick wants to know !
Input
The first line contain a integer (no morn than 10), the following is test case, for each test case : Each line contains contains three integer c, n, k (, ). Separated by an white space.
Output
For each test case output one line denotes the answer that Patrick Star wants to know.
Sample Input
1
1 1 1
Sample Output
3
Source
2018 Multi-University Training Contest 6