Skip to content

Instantly share code, notes, and snippets.

@mresetar
Created September 12, 2011 21:51
Show Gist options
  • Save mresetar/1212573 to your computer and use it in GitHub Desktop.
Save mresetar/1212573 to your computer and use it in GitHub Desktop.
euler problem one
int sum
(1..999).each { int i -> sum += i%3==0 ? i : i%5==0 ? i:0 }
print sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment