Skip to content

Instantly share code, notes, and snippets.

@trys
Created October 27, 2015 20:55
Show Gist options
  • Save trys/d105d00c2f3ecd9b0e15 to your computer and use it in GitHub Desktop.
Save trys/d105d00c2f3ecd9b0e15 to your computer and use it in GitHub Desktop.
Problem Sixteen
var result = 0,
count = 0;
result = bigInt(2).pow( 1000 ).toString();
for (var i = result.length - 1; i >= 0; i--) {
count += parseInt( result[ i ] );
}
document.write( count );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment