题解 | #牛牛的排列数#
牛牛的排列数
https://www.nowcoder.com/practice/9ca1c236cdbf46da9e08e1f510808625
#include <stdio.h> int permutation(int n, int m) { if (m == 1) { return n; } else { return n * permutation(n-1, m - 1); } } int main() { int n, m = 0; scanf("%d %d", &n, &m); printf("%d", permutation(n, m)); return 0; }
c语言刷题 文章被收录于专栏
c语言刷题题目