| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 73960 | hby | n的阶乘 | C++ | Compile Error | 0 MS | 0 KB | 171 | 2024-05-20 20:23:29 |
#include<iostream> using namespace std; int jc(int x){ if(x==1) return 1; else return x*jc(x-1); } int main() int n; cin>>n; { cout<<jc(n); return 0; }
Main.cc:10:1: error: expected initializer before 'int'
int n;
^
Main.cc:11:1: error: 'cin' does not name a type
cin>>n;
^
Main.cc:12:1: error: expected unqualified-id before '{' token
{ cout<