Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
720 | 贺思哲 | 函数求和 | C++ | Compile Error | 0 MS | 0 KB | 254 | 2023-03-04 14:48:31 |
#include<iostream> using namespace std; int sum1(int a,int b){ int c=0; for(int i=a;i<=b;i++){ c+=i; } return c; } } int main(){ cout<<sum1(1,10)<<endl; cout<<sum1(20,30)<<endl; cout<<sum1(35,45)<<endl; }
Main.cc:10:1: error: expected declaration before '}' token } ^