题解 | #阶乘#
阶乘
https://www.nowcoder.com/practice/4b8f5815c7cd40ab851c24fc5de70fa4
#include <iostream>
using namespace std;
int main() {
int n;cin>>n;
while(n--){
int tmp;cin>>tmp;
long long res=1;
for(int i =1;i<=tmp;i++)
res*=i;
cout<<res<<endl;
}
}
// 64 位输出请用 printf("%lld")
要用到long long

