Skip to content

Instantly share code, notes, and snippets.

@johnmichel
Created January 24, 2009 17:42
Show Gist options
  • Save johnmichel/51491 to your computer and use it in GitHub Desktop.
Save johnmichel/51491 to your computer and use it in GitHub Desktop.
// holy crap. this is old. and probably broken.
double total = 0;
for (int i=0; i <= 1000; i++) {
total = total + (int)Math.pow(i,i);
if (i == 1000)
System.out.println(Math.pow(1000,1000));
System.out.println(total);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment