OJ-Problems-Source/VIJOS/1307_chronix.cpp

11 lines
140 B
C++
Raw Normal View History

2016-08-05 11:59:16 +08:00
#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;
}