Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
111200 范恒恺 13求n的阶乘 C++ Wrong Answer 1 MS 268 KB 201 2025-03-01 10:45:58

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ long long i,n,n1,sum=1; cin>>n; for(i=1;i<=n;i++){ sum*=i; cout<<sum<<endl; } if(n==0){ cout<<"1"; return 0; } cout<<sum; }


Run Info:

------Input------
11
------Answer-----
39916800
------Your output-----
1 2 6 24 120 720 5040 40320 362880 3628800 39916800 39916800