| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 142473 | 夏梓瑞 | n的阶乘 | C++ | Wrong Answer | 0 MS | 276 KB | 413 | 2026-01-10 17:04:52 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int a(int s,int i,int sum){ if(i==s) return sum; return a(s,i+1,sum*i); } int main(){ int n; cin>>n; cout<<a(n,2,1); return 0; }
------Input------
6
------Answer-----
720
------Your output-----
120