mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
11 lines
140 B
C++
11 lines
140 B
C++
#include <iostream>
|
|
|
|
int main(){
|
|
long long re,n;
|
|
std::cin>>n;
|
|
re=n*(n+1)*(2*n+1);
|
|
re/=6;
|
|
std::cout<<re;
|
|
return 0;
|
|
}
|