UVa 10302 - Summation of Polynomials

10302 - Summation of Polynomials

 * http://icpcres.ecs.baylor.edu/onlinejudge/external/103/10302.html

Explanation
Just compute following summations of this by formula: $$1^3 + 2^3 + 3^3 + ... + x^3$$

Gotchas

 * Find formula
 * Use long long data type.

Input
1 2 3 1000 3000 50000

Output
1 9 36 250500250000 20263502250000 1562562500625000000