Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
165379 赵天睿 13求n的阶乘 C++ Compile Error 0 MS 0 KB 148 2026-11-15 10:11:21

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:19: error: 'n' was not declared in this scope
    for(int i=1;i<=n;i++)
                   ^