主页 讨论版 问题 名次 状态 统计
欢迎加入西电微软俱乐部招新群 588166170,做出福利题,免技术部第一次面试且赠送“福利”海报或小礼品~~~~
问题 B: Water Problem: Items divided

问题 B: Water Problem: Items divided

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

题目描述

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.


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