Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2012 03:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/3261309 to your computer and use it in GitHub Desktop.
Save anonymous/3261309 to your computer and use it in GitHub Desktop.
Tom made me do it
## to find the value of the sum of all the multiples of 3 and 5 less than or equal to 1000
n = (1000/5).rounddown(0)
m = (1000/3).rounddown(0)
x = sum [0:n]*5
y = sum [0:m]*3
answer = x + y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment