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?
1183: Water Problem: Items divided时间限制: 2 Sec 内存限制: 128 MB
提交: 193 解决: 39
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
1+1+2 = 1+3=2+2 = 4
please use printf and scanf.