Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
126661 12 计算n的阶乘 C++ 通过 100 0 MS 244 KB 212 2024-01-24 16:52:45

Tests(3/3):


#include<bits/stdc++.h> using namespace std; long long fact(long long x){ if(x==0) return 0; if(x==1) return 1; else{ return x*fact(x-1); } } int main(){ int n; cin>>n; cout<<fact(n); return 0; }


测评信息: