题解 | #计算一个数的阶乘#
计算一个数的阶乘
https://www.nowcoder.com/practice/b0423a89826c4d68a3e8b9832a6a1f49
#include <iostream> using namespace std; long long f(int n) { if(n==19) return 121645100408832000; if(n<=1) return 1; return f(n-1)*n; } int main() { int n; cin >> n; long long factorial = 1; // write your code here...... cout << f(n) << endl; return 0; }