Beemer (dr_tectonic) wrote,

2015 puzzle

I need to write up our Christmas trip, but real quick I will mention that, after a day of doing very little other than (1) starting to pay bills and realizing they haven't all arrived in the mail yet, (2) using up Christmas gift cards on Amazon, and (3) Tactics Ogre on the PSP, I spent a good chunk of the evening solving this year's "year digits" puzzle in Technology Review.

The puzzle is: "How many integers from 1 to 100 can you form using just the digits in the year (once each) and the operators +, -, *, /, and ^?" (Parentheses are allowed, also.)

And the answer is, "you can write a program in R to enumerate and tally up all the allowable expressions in 36 lines of code". Not even terribly arcane code, either, though I did make use of a recursive loopy thing to avoid repeating a bunch of loops of different sizes.

(You can make 53 of the 100 integers.)

Oh dear god, is that the time?

  • Whoops!

    Just discovered that my Dreamwidth posts haven't been crossposting to LJ since shortly after the pandemic started because I forgot to update my…

  • Milestones

    On Tuesday two weeks ago, I gave the talk that I was scheduled to give a year ago before the conference I was giving it at was cancelled. It's still…

  • Snowpocalypse 21

    It was cloudy and snizzling most of the day Saturday, but the snow didn't really start until Saturday night, and then it kept going all day Sunday.…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded