解题

C2023034 2024-02-26 9:47:40 2024-02-26 9:48:18

#include<bits/stdc++.h> using namespace std;

int main() { int n; cin>>n; long long s=0; for(int x=1;x<=n;x++)

{
  s=s+x*(x+1);
}
cout<<s;
return 0;

}

共 1 条回复

C2023034