|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
分球
有n个标号的球分到m个无差别的盒子里,每个盒子至少有一个球,问方案
数。
输入
多组数据;
每部分1行两个数n和m
输出
每组1行1个数,表示方案数。
样例
输入(ball.in):
4 2
1 1
输出(ball.out):
7
1
样例解释
n=4,m=2
1,2 3 4
2,1 3 4
3,1 2 4
4,1 2 3
1 2,3 4
1 3,2 4
1 4,2 3
数据规模
20%,满足1=<n,m<=10
100%,满足1=<n,m<=100,数据组数<=10
|
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
多组数据;
每部分1行两个数n和m
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
每组1行1个数,表示方案数。 |
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1088 |
|
其它 |
通过 |
28人 |
提交 |
82次 |
通过率 |
34% |
难度 |
2 |
|
|
|
|
|
|