Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5349 | 若楷编程专用 | 13求n的阶乘 | C++ | Compile Error | 0 MS | 0 KB | 132 | 2024-11-09 20:46:45 |
#include<iostream> using namespace std; int main(){ longlong y,n=1; cin>>y; for(longlong i=1;i<=y;i++){ n*=i;} cout<<n;}
Main.cc: In function 'int main()': Main.cc:4:2: error: 'longlong' was not declared in this scope longlong y,n=1; ^ Main.cc:4:11: error: expected ';' before 'y' longlong y,n=1; ^ Main.cc:5:7: error: 'y' was not declared in this scope cin>>y; ^ Main.cc:6:15: error: expected ';' before 'i' for(longlong i=1;i<=y;i++){ ^ Main.cc:6:19: error: 'i' was not declared in this scope for(longlong i=1;i<=y;i++){ ^ Main.cc:7:3: error: 'n' was not declared in this scope n*=i;} ^ Main.cc:8:7: error: 'n' was not declared in this scope cout<<n;} ^