Darth Paradox (darthparadox) wrote,
Darth Paradox
darthparadox

Whoops.

So, Problem 8 in Project Euler gives us a 1000-digit number, and asks us to find the largest product of five consecutive digits inside the number. I work out the math, realize that the brute-force approach starting from lists of consecutive integers would require somewhere in the range of 10^200 comparisons to verify a maximum, and start looking for a better way. I find one, then fail at implementing it.

Then I'm talking to Matt, and he points out the problem says "consecutive digits", not integers. Like, digits inside the number. As in 996 computations for the brute-force method instead of 10^200, and working with numbers with five or six digits instead of hundreds or a thousand.

I'm fantastic at math, and a pretty damn good programmer. But apparently reading comprehension is one of my weak points.
Subscribe

  • I write words that make computers do things.

    Inspired by XKCD's Up-Goer Five, there's a meme going around where people try to describe their jobs (or other technical subjects) using…

  • Still Alive

    I've posted exactly once since my son was born, and that was a brief bit about NaNoWriMo (which I've since utterly failed). I guess I've…

  • Hey, I remember this thing!

    I've been in pretty heavy lurker-mode lately, but November does strange things. That's right - it's National Novel Writing Month! I'm working on a…

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 14 comments

  • I write words that make computers do things.

    Inspired by XKCD's Up-Goer Five, there's a meme going around where people try to describe their jobs (or other technical subjects) using…

  • Still Alive

    I've posted exactly once since my son was born, and that was a brief bit about NaNoWriMo (which I've since utterly failed). I guess I've…

  • Hey, I remember this thing!

    I've been in pretty heavy lurker-mode lately, but November does strange things. That's right - it's National Novel Writing Month! I'm working on a…