网络同步赛中一些题目描述有误,已经在 OJ 题目页面进行勘误。

问题 1183. -- Water Problem: Items divided

1183: Water Problem: Items divided

时间限制: 2 Sec  内存限制: 128 MB
提交: 193  解决: 39
[提交][状态][讨论版]

题目描述

Youyouyouyou is very interested in math, one day, an idea came into his mind that how many ways he can patition n same things into no more than m groups? he think it too hard for him, so youyouyouyou ask wise cyt for help, but wise cyt don’t want to talk with youyouyouyou because it is too easy for him, now can you help youyouyouyou solve this problem?

输入

multi test cases, two integers n and m(1<=m<=n<=1000) , end with n = m = 0.

输出

output an answer modulo 1e9 + 7 per line

样例输入

4 3
0 0

样例输出

4

提示



1+1+2 = 1+3=2+2 = 4 


please use printf and scanf.


来源

[提交][状态][讨论版]