mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
12 lines
174 B
C++
12 lines
174 B
C++
|
#include <iostream>
|
||
|
using namespace std;
|
||
|
int n;
|
||
|
int main()
|
||
|
{
|
||
|
while(scanf("%d",&n) != EOF)
|
||
|
{
|
||
|
cout<<(n*n*n + 5*n + 6)/6<<endl;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|