1!=?
查看原帖
1!=?
1319065
cxlqwq楼主2024/12/22 11:44
#include <bits/stdc++.h>
using namespace std;

int f(int x) {
	if (x == 1)
		return 0;
	return x * f(x - 1);
}

int main() {
	int n;
	cin >> n;
	cout << f(n);
	return 0;
}

2024/12/22 11:44
加载中...