Skip to content

Instantly share code, notes, and snippets.

@kitak
Created July 24, 2012 10:30
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 kitak/3169306 to your computer and use it in GitHub Desktop.
Save kitak/3169306 to your computer and use it in GitHub Desktop.
problem2
# coding- utf-8
sum = 2
t = 1
t2 = 2
while (t + t2) < 4000000
tmp = t2
t2 = t + t2
t = tmp
if t2 % 2 == 0
sum += t2
end
end
puts sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment