题解 | #n的阶乘#
n的阶乘
https://www.nowcoder.com/practice/97be22ee50b14cccad2787998ca628c8
#include<iostream> using namespace std; typedef long long LL; LL jie(int n) { LL res = 1; for(int i = 1;i <= n;i++) res *= i; return res; } int main(void) { int n; while(cin >> n) { cout << jie(n) << endl; } return 0; }