Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83980 卢语涵 13求n加到m的和 C++ Compile Error 0 MS 0 KB 145 2024-07-15 10:48:09

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ long long n,m; cin>>n>>;m cout<<(m+n)*(m-(n-1))/2; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:13: error: expected primary-expression before ';' token
     cin>>n>>;m
             ^
Main.cc:6:5: error: expected ';' before 'cout'
     cout<<(m+n)*(m-(n-1))/2;
     ^
Main.cc:6:28: warning: statement has no effect [-Wunused-value]
     cout<<(m+n)*(m-(n-1))/2;
                            ^