OJ-Problems-Source/HDOJ/1290_autoAC.cpp

12 lines
174 B
C++
Raw Normal View History

2016-08-13 17:16:08 +08:00
#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;
}