#nt1001. 组合数取模5
组合数取模5
Binomial Coefficients Modulo p
Problem Description
Given a prime and an integer , for each , count how many pairs with satisfy .
Input Format
The first line contains two integers .
Output Format
Output one line of numbers, the answers for .
Sample Input
114 7
Sample Output
4012 900 273 450 315 276 444
Constraints
For all test cases, , , and is prime.