永远无敌的暴力破解
2025-08-23 16:42:17
发布于:广东
6阅读
0回复
0点赞
他的输入范围是0到10所以可以直直直直直直直直直直直直直直直接暴力破解
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
if (n == 0) {
cout << 1 << endl;
} else if (n == 1) {
cout << 1 << endl;
} else if (n == 2) {
cout << 2 << endl;
} else if (n == 3) {
cout << 6 << endl;
} else if (n == 4) {
cout << 24 << endl;
} else if (n == 5) {
cout << 120 << endl;
} else if (n == 6) {
cout << 720 << endl;
} else if (n == 7) {
cout << 5040 << endl;
} else if (n == 8) {
cout << 40320 << endl;
} else if (n == 9) {
cout << 362880 << endl;
} else if (n == 10) {
cout << 3628800 << endl;
}
return 0;
}
拿下拿下
这里空空如也
有帮助,赞一个