Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159626 钱炜懿 13求n的阶乘 C++ Compile Error 0 MS 0 KB 427 2026-09-05 16:52:53

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:20: error: 'n' was not declared in this scope
     for(int i=1;i<=n;i++){
                    ^
Main.cc:8:5: error: expected ';' before '}' token
     }
     ^
Main.cc:9:11: error: 'i' was not declared in this scope
     cout<