Problem J
How Many Solutions?
Input: Standard Input
Output: Standard Output
Time Limit: 2 Second
Given the values of three integers m, n, p how many integer solutions does the following equation have?

Input
Input is terminated by a case where the value of m, n
and p (-1000 ≤ m, n, p ≤ 1000) is zero.
For each set of input produce one line of output which contains the serial of output followed by an integer N which indicates how many solutions are there for the given value of m, n and p.
1 2 42 3 40 0 0 |
Case 1: 11 Case 2: 23 |
Problem setter: Shahriar Manzoor, EPS
Be ware!! This problem has no alternate solution.
Comment:
The equation corresponding to the first
sample input is:
and the 11 solutions
corresponding to this equation is:
-28 7
-12 6
-4 4
2 -8
3 -24
5 40
6 24
8 16
12 12
20 10
36 9