November, are you that kid who always feels compelled to shout everyone else down to show your smarts? You're challenging proofs that don't exist, arguing about counting pieces when there are no cuts made, and determined to have some big pissing contest over "efficiency" when the actual problem only involves adding seven numbers? This puzzle was meant to be fun.
Per your statement of getting it done faster in C... I challenge you to write this program in C, compile it and get a result faster than I can do the same in PHP or perl. :-)
Quite right, an interpreted language is the way to go here since execution times aren't very important (yes - as with MOST programming tasks in the world). As an aside, so you don't think I'm picking on PHP, I'll confess that my weapon of choice for most things is ruby, not because it's the least bit efficient or speedy, but because I'm so slow at coding in C.
And yes the programmer's efficiency is usually more important than the efficiency of the code - otherwise you're stuck with a philosophy that has you tweaking every code library you use, re-inventing every wheel. BTW, Yahoo is NOT getting efficient code. They don't care - they do it to make efficient use of programming resources.