- 问答
- 2017-08-30 11:04:09 @
Var n, m : Integer;
Function solve(n, m : Integer) : Integer;
Var i, sum : Integer;
Begin
If m = 1 Then
Begin
solve := 1;
Exit;
End;
sum := 0;
For i := 1 To n - 1 Do
sum := sum + solve(i, m - 1);
solve := sum;
End;
Begin
Readln(n, m);
Writeln(solve(n, m));
End.
0 条评论
目前还没有评论...