Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149105 马俊潇 13求1╳2+2╳3+3╳4+...+10╳11的和 C++ Compile Error 0 MS 0 KB 151 2026-03-07 14:40:23

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int n=1,a=0; for(int i=n;i<=10;i++){ a=a+n*(n+1)} cout<<a; return 0;}


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:15: error: expected ';' before '}' token
    a=a+n*(n+1)}
               ^