Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131417 何旻慧 13求n的阶乘 C++ Compile Error 0 MS 0 KB 188 2025-09-24 19:33:00

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl using namespace std; int main(){ longlong n,s=1; cin>>n; for (int i=1;i<=n;i++){ s*=i; } cout<<s; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:5: error: 'longlong' was not declared in this scope
     longlong n,s=1;
     ^
Main.cc:5:10: error: 'n' was not declared in this scope
     cin>>n;
          ^
Main.cc:7:9: error: 's' was not declared in this scope
         s*=i;
         ^
Main.cc:9:11: error: 's' was not declared in this scope
     cout<