| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 142427 | 翁思宸 | n的阶乘 | C++ | Accepted | 1 MS | 272 KB | 299 | 2026-01-09 18:49:50 |
//1528 n的阶乘(递归) #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int use(int n){ int s=0,a=1; if(n==1){ return 1; } return n*use(n-1); } int main(){ int n; cin>>n; cout<<use(n); return 0; }