Sum of the digits of 2 1729 {2}^{1729}

What is the sum of the digits of the number 2 1729 {2}^{1729} ?

For example, the sum of digits of 2 15 = 32768 {2}^{15} = 32768 is 3 + 2 + 7 + 6 + 8 = 26 3 + 2 + 7 + 6 + 8 = 26 .


Try other problems here .


The answer is 2387.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Kunal Gupta
Jul 6, 2017

Python one liner:

print sum(map(int,list(str(2**1729))))

I wish i will learn Python one day.

Rishabh Deep Singh - 3 years, 11 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import java.math.BigInteger;

public class main {
    public static void main( String[] args) {
        int result = 0;
        String val = BigInteger.valueOf(2).pow(1729).toString();
        for(char a : val.toCharArray())
            result = result + Character.getNumericValue(a);
        System.out.println("val == " + result);
     }
}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...