#include<bits/stdc++.h> #define ll long long using namespace std; int main() { ll a[50005]; a[1]=1; for(ll i=2; i<=50005; i++) { a[i]=a[i-1]+(i*i*i); } ll n; while(cin>>n) { cout<<a[n]<<endl; } return 0; }
Wednesday, November 2, 2016
UVa 10302
Labels:
UVA Solution
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thank you for commenting. Please wait for response :)