We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

Loading...

- All Contests
- ProjectEuler+
- Project Euler #16: Power digit sum

# Project Euler #16: Power digit sum

# Project Euler #16: Power digit sum

_{This problem is a programming version of Problem 16 from projecteuler.net}

and the sum of its digits is .

What is the sum of the digits of the number ?

**Input Format**

The first line contains an integer , i.e., number of test cases.

Next lines will contain an integer .

**Constraints**

**Output Format**

Print the values corresponding to each test case.

**Sample Input**

```
3
3
4
7
```

**Sample Output**

```
8
7
11
```

**Explanation**

- , sum of digits is .
- , sum of digits is .
- , sum of digits is .