BETA
Sum of fifth powers of the first n natural numbers
Submissions: 2265   Accuracy:

20.3%

  Difficulty: Basic
         

You will be given a number N. Your task is to find sum of Fifth powers of the first N natural numbers 15 + 25+ 35 + 45+ …….+ N5 till N-th term.

Input:
The first line of the input contains a single integer T, denoting the number of test cases. Then T test case follows, a single line of the input containing a positive integer N.

Output:
For each test-case, print sum of Fifth powers of the first N natural numbers 15 + 25+ 35 + 45+ …….+ N5 till N-th term.

Constraints:
1<=T<=100
1<=N<=1000

Example:

Input:
3
1
2
3

Output:
1
33
276

Explanation:

For testcase 2: The first 2 natural numbers are 1 and 2. So 15+25=1+32=33

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ankit Sharma
Author: Soul_xhacker


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.