Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.math.BigInteger;
- /**
- *
- * @author psychocoder
- */
- public class BigPrime {
- public static void main(String[] args) {
- String m = BigInteger.ONE.shiftLeft(1000).toString();
- int i=0,sum=0;
- while(i<m.length()){
- sum = sum + m.charAt(i) - '0';
- i++;
- }
- System.out.println(sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement