Sign in
|
Join
|
Help
Lazy Evaluation
Marina's coding (mis)adventures
This Blog
Home
Contact
About
Syndication
RSS for Posts
Atom
RSS for Comments
Search
Go
Community
Home
Blogs
Media
Forums
Groups
Blogs I Read
SRT Blogs
Joel on Software
Software Creation Mystery
Code Odor
Trivium
Joe Damato
Brazen Careerist
Tags
books
euler
google
incompetence
interviews
nerd
people
rails
ruby
Email Notifications
Recent Posts
Euler problem #6
euler problem #5
Euler Problem 4
Euler Problem 3
Project Euler: Problem 2
Archives
October 2009 (2)
August 2009 (1)
June 2009 (1)
April 2009 (1)
January 2009 (1)
December 2008 (1)
October 2008 (2)
August 2008 (1)
May 2008 (1)
April 2008 (5)
March 2008 (1)
Browse by Tags
All Tags
»
euler
»
ruby
(
RSS
)
incompetence
Mon, Oct 27 2008 12:11 PM
Euler problem #6
Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum. ---- We don't actually need a computer to solve this problem, but why not? ...
Posted by
mfedner
| with
no comments
Filed under:
euler
,
ruby
Thu, May 1 2008 9:40 PM
euler problem #5
What is the smallest number that is evenly divisible by all of the numbers from 1 to 20? ---- To solve this problem easily, we need to remember that the smallest number that is evenly divisible by two...
Posted by
mfedner
|
1 comment(s)
Filed under:
euler
,
ruby
Tue, Apr 8 2008 8:35 PM
Euler Problem 4
Find the largest palindrome made from the product of two 3-digit numbers. ----- First, I defined a palindrome recursively: a number is one if its first and last digits are the same, and if the inside is...
Posted by
mfedner
|
4 comment(s)
Filed under:
euler
,
ruby
Tue, Apr 8 2008 8:07 PM
Euler Problem 3
What is the largest prime factor of the number 600851475143 ? ----- I wrote this piece of disgusting, un-Rubylike Ruby to get the answer by creating a list of a number's prime factors: def factor(composite...
Posted by
mfedner
|
1 comment(s)
Filed under:
euler
,
ruby
,
incompetence
Sun, Apr 6 2008 7:55 PM
Project Euler: Problem 2
The problem: Find the sum of all the even-valued terms in the [Fibonacci] sequence which do not exceed four million. Here's my fibonacci function: def fib(limit =nil) f1 = 0 f2 = 1 while (not limit...
Posted by
mfedner
|
716 comment(s)
Filed under:
euler
,
ruby
Sun, Apr 6 2008 1:31 PM
Project Euler in Ruby
I'm taking Bill Wagner up on his Project Euler challenge , but in Ruby. I've secretly wanted to learn Ruby for a long time, and this looks like the perfect chance. So if my code makes your eyes...
Posted by
mfedner
|
916 comment(s)
Filed under:
euler
,
ruby