记录详情

Compile Error

/in/foo.cc:3:27: error: conflicting declaration 'int a'
 int Sum(vector<int> a,int a,int b){
                           ^
/in/foo.cc:3:21: note: previous declaration as 'std::vector<int> a'
 int Sum(vector<int> a,int a,int b){
                     ^
/in/foo.cc: In function 'int Sum(std::vector<int>, int)':
/in/foo.cc:5:12: error: cannot convert 'std::vector<int>' to 'int' in initialization
  for(int i=a;i<=b;i++)
            ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:19:16: error: too many arguments to function 'int Sum(std::vector<int>, int)'
    if(Sum(a,i,j)%k==0)
                ^
/in/foo.cc:3:5: note: declared here
 int Sum(vector<int> a,int a,int b){
     ^~~

信息

递交者
类型
自测
题目
P1105 连续数之和
语言
C++
递交时间
2024-10-27 17:12:42
评测时间
2024-10-27 17:12:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes