提交时间:2023-05-27 16:27:21

运行 ID: 74554

#include<bits/stdc++.h> using namespace std; int a[1000010],t[1000010]; long long ans=0; int main(){ //freopen("a3.in","r",stdin); //freopen("a3.out","w",stdout); long long n,num=0; cin>>n; for(int i=1;i<=n;i++){ num+=i*i; } cout<<num<<endl; return 0; }