描述
Given two positive integers N and M, please divide N into several integers A1, A2, ..., Ak (k >= 1), so that:
1. 0 < A1 < A2 < ... < Ak;
2. A1 + A2 + ... + Ak = N;
3. A1, A2, ..., Ak are different with each other;
4. The product of them P = A1 * A2 * ... * Ak is a multiple of M;
How many different ways can you achieve this goal?
输入
Two integers N and M. 1 <= N <= 100, 1 <= M <= 50.
输出
Output one integer -- the number of different ways to achieve thi......
阅读全文