This website requires JavaScript.
Explore
Help
Sign In
dan
/
challenges
Watch
1
Star
0
Fork
You've already forked challenges
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
2d574d4514
challenges
/
e1
/
e1.rb
10 lines
99 B
Ruby
Raw
Normal View
History
Unescape
Escape
Starting Euler 1: done python, ruby and lisp, working on erlang
2011-03-27 17:31:47 +00:00
#!/usr/bin/ruby
sum
=
0
for
i
in
2
..
999
if
i
%
3
==
0
or
i
%
5
==
0
sum
+=
i
end
end
Shorter code
2011-04-01 19:34:24 +00:00
puts
sum