1 #include <iostream> 2 using namespace std; 3 int a[1001]; 4 int main() { 5 int n; 6 while(cin>>n) 7 cout<<(n*n*n+5*n)/6+1<<endl; 8 }
1 #include <iostream> 2 using namespace std; 3 int a[1001]; 4 int main() { 5 int n; 6 while(cin>>n) 7 cout<<(n*n*n+5*n)/6+1<<endl; 8 }