1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <stdio.h>
#include <stdlib.h>
int
n_k(
int
n,
int
k)
{
if
(k)
return
n*(n_k(n, k-1));
return
1;
}
int
main()
{
int
n = 0;
int
k = 0;
scanf
(
"%d"
, &n);
scanf
(
"%d"
, &k);
int
mul = n_k(n, k);
printf
(
"%d\n"
, mul);
system
(
"pause"
);
return
0;
}
|
本文转自 七十七快 51CTO博客,原文链接:http://blog.51cto.com/10324228/1688232