UVa 10302

From Algorithmist
Jump to: navigation, search

10302 - Summation of Polynomials[edit]

Explanation[edit]

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

Gotchas[edit]

  • Find formula
  • Use long long data type.

Implementations[edit]

Input[edit]

1
2
3
1000
3000
50000

Output[edit]

1
9
36
250500250000
20263502250000
1562562500625000000