import java.math.BigInteger;

/**
 * 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
 *
 * What is the sum of the digits of the number 2^1000?
 *
 * @author David Clutter
 */
public class Problem0016 {

    public static void main(final String[] args) {
        final String numberString = BigInteger.valueOf(2).pow(1000).toString();
        final int sum = numberString.chars().map(Character::getNumericValue).sum();
        System.out.println(sum);
    }
}
@@ -286,28 +286,19 @@
  String 
-n
+s
 um
-berString
  = BigIn
@@ -317,18 +317,44 @@
 f(2)
-.pow(1000)
+%0A            .pow(1000)%0A            
 .toS
@@ -360,17 +360,16 @@
 String()
-;
 %0A       
@@ -373,44 +373,33 @@
     
-final int sum = numberString.chars()
+    .chars()%0A            
 .map
@@ -426,16 +426,29 @@
 icValue)
+%0A            
 .sum();%0A
@@ -486,9 +486,10 @@
 ;%0A    %7D%0A
-
 %7D
+%0A

Update Problem0016.java