有 lns="http://www.w3.org/1998/Math/MathML">55 分、lns="http://www.w3.org/1998/Math/MathML">22 分、lns="http://www.w3.org/1998/Math/MathML">11 分的硬币无限多,从中取 lns="http://www.w3.org/1998/Math/MathML">nn 枚硬币,凑成 lns="http://www.w3.org/1998/Math/MathML">mm 分钱,有多少种不同的方法?
例如, lns="http://www.w3.org/1998/Math/MathML">nn = lns="http://www.w3.org/1998/Math/MathML">55, lns="http://www.w3.org/1998/Math/MathML">mm = lns="http://www.w3.org/1998/Math/MathML">1313 时,有以下两种方法:
lns="http://www.w3.org/1998/Math/MathML">11 个 lns="http://www.w3.org/1998/Math/MathML">55 分,lns="http://www.w3.org/1998/Math/MathML">44 个 lns="http://www.w3.org/1998/Math/MathML">22 分,lns="http://www.w3.org/1998/Math/MathML">00 个 lns="http://www.w3.org/1998/Math/MathML">11 分。
lns="http://www.w3.org/1998/Math/MathML">22 个 lns="http://www.w3.org/1998/Math/MathML">55 分,lns="http://www.w3.org/1998/Math/MathML">00 个 lns="http://www.w3.org/1998/Math/MathML">22 分,lns="http://www.w3.org/1998/Math/MathML">33 个 lns="http://www.w3.org/1998/Math/MathML">11 分。
某种面值的硬币数量可以是 lns="http://www.w3.org/1998/Math/MathML">00,但不能是负数。输入 lns="http://www.w3.org/1998/Math/MathML">nn 和 lns="http://www.w3.org/1998/Math/MathML">mm ,计算凑成 lns="http://www.w3.org/1998/Math/MathML">mm 分钱的方法数,当然也可能无法凑成 lns="http://www.w3.org/1998/Math/MathML">mm 分钱,方法数是 lns="http://www.w3.org/1998/Math/MathML">00。
第一行一个正整数 lns="http://www.w3.org/1998/Math/MathML">nn 。
第二行一个正整数 lns="http://www.w3.org/1998/Math/MathML">mm 。
5 13
2
【样例解释】
见题目描述。
【数据范围】
lns="http://www.w3.org/1998/Math/MathML">n \leq 30n≤30。
lns="http://www.w3.org/1998/Math/MathML">n \leq m \leq 5 \times nn≤m≤5×n 。