Tuesday, May 08, 2007

Programming Wind Sprints

Project Euler is a chance to do some programming wind sprints.

There are plenty of problems to choose from, and they all require you to puzzle through some sort of tricky question. I like how the questions are worded, and include an example answer.

I spent 20 minutes working through this one:

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest number that is evenly divisible by all of the numbers from 1 to 20?

I worked out a solution in JavaScript that solved the 1 to 10 version, but failed on 1 to 20 (in other words, it wasn't a solution at all). I gave up because it was way past my bed time.

Like wind sprints, it left me feeling out of shape and in need of more exercise.

1 comment:

  1. Cool, sounds like geek-fun. I used to enjoy doing topcoder competitions, because it was a fun to do short-but-complex challenges, especially when the potential existed for a cash payout. :)

    I stopped participating when they stopped paying, because it was hard to justify an uninterruptible 2 hour block to my wife/kids without the monetary aspect.

    But I do miss the little programming challenges. I'll have to try Project Euler sometime.