spoj#GAMECG. GAME
GAME
Ashton Carl McDonalds (known as A.C.M.) works at a small school. The school have decided to compete in a new style of game designed by programmers. This game is organized in teams, each team have the size of M competitors, the goal of the game is to each team solve the maximum number of problems, if there is a tie, the team who solved faster win. It is important to you know that the order of the members in a team doesn't matter.
Carl was designed by his school to be a kind of coach of this game. He needs to train all the teams of his school, and the most important, he needs to choose theses teams. A.C.M is kind of worried if it will be a lot of teams, and maybe it will be a lot of work to him. Due to this, he decides to count how many different teams can exist in his school.
McDonalds is not good on mathematics, due to this he asked you to count the number of different teams. A.C.M knows that the result can be very large, so he asked to you to give the result in modulus 1300031, but he needs to know if the result exceeds 1300030 or not.
Input
The input consists of several lines.
Each line consists of two integers N (1 <= N <= 10^6) and M (1 <= M <= N), the number of students and the numbers of members in each team.
Output
The output consists of two lines. The first line contains the result in modulus, and the second line contains “Exceeds” if the result exceeds 1300030 or “Does not exceed” if the result does not exceed 1300031.
Sample Input |
Sample Output |
3 1 140 60 15 8 |
3 Does not exceed 207865 Exceeds 6435 Does not exceed |