Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Created February 15, 2011 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Riduidel/827655 to your computer and use it in GitHub Desktop.
Save Riduidel/827655 to your computer and use it in GitHub Desktop.
long start = System.currentTimeMillis();
def range = 1..501
println range.sum(-3, { n -> 4*(2*n-1)*(2*n-1)-12*(n-1) })
long end = System.currentTimeMillis();
println "duration "+((end-start)/1000.0)+" s";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment