TopCoder

User's AC Ratio

98.3% (58/59)

Submission's AC Ratio

89.7% (78/87)

Description

$n$個相同的箱子要放入$m$個不同的球,問有幾種放法。

Input Format

輸入兩個整數$n,m。( 5\leq n, m\leq 200 )$

$n代表箱子, m代表球子。n=m=0 代表測試資料結束。$

Output Format

因為答案會很大, 所以聰明的你一定會把他$\%1000000$再輸出。

Sample Input

26 11
21 45
35 35
39 32
45 45
75 89
81 93
84 96
148 164
173 184
0 0

Sample Output

678570
517677
426570
925644
693415
448870
342366
969690
788157
711564

Hints

H是不行的 by 球主。

Problem Source

原TIOJ1291 / 雄中公假社'08 入退社考。Problem Setter:DarkPrinces

Subtasks

For Testdata: 0 ~ 0, Score: 10
For Testdata: 1 ~ 1, Score: 10
For Testdata: 2 ~ 2, Score: 10
For Testdata: 3 ~ 3, Score: 10
For Testdata: 4 ~ 4, Score: 10
For Testdata: 5 ~ 5, Score: 10
For Testdata: 6 ~ 6, Score: 10
For Testdata: 7 ~ 7, Score: 10
For Testdata: 8 ~ 8, Score: 10
For Testdata: 9 ~ 9, Score: 10
No. Time Limit (ms) Memory Limit (KiB)
0 2000 65536
1 2000 65536
2 2000 65536
3 2000 65536
4 2000 65536
5 2000 65536
6 2000 65536
7 2000 65536
8 2000 65536
9 2000 65536