Skip to content

Instantly share code, notes, and snippets.

@joecannatti
Created January 4, 2012 01:20
Show Gist options
  • Save joecannatti/1557928 to your computer and use it in GitHub Desktop.
Save joecannatti/1557928 to your computer and use it in GitHub Desktop.
project euler 40
<html>
<body>
<div id="output"></div>
<script>
var number = '';
for(var i=1; i<=1000000;i++){
number = number + i;
}
var answer = number[0] * number[9] * number[99] * number[999] * number[9999] * number[99999] * number[999999];
document.getElementById("output").innerHTML = answer;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment