> > What's odd is that my little Perl program found *TWO* solutions, but one > > is potentially ambiguous [in particular, given those rules, what should > > the value of "a*b*c" be?-- it doesn't say whether things should be done > > left-to-right or right-to-left, so perhaps that could be used to exclude > > one of the two solutions. > > It doesn't matter whether the multiplication is evaluated left-to-right or > right-to-left, because multiplication is associative. The product is the > same either way.
Ah, you're right, of course. Lost my head. In that case, it isn't at all clear to me that the solution is "unique"... > There was discussion of this puzzle on the Boston.pm mailing list as well. > The thread starts at > http://mail.pm.org/pipermail/boston-pm/2002-October/000160.html Alas, the 'discussion' seemed to be all-golf and little analysis and I don't find golf all that much fun... oh well.. For example, is there a cleverer [not necessarily golf-shorter] way to count base-3 other than the remainder/quotient hack that I used? and Bad form, IMO, since it was an ongoing contest... I waited to send this until the submission deadline had passed... [although I suppose only about a bazillion people coded this up in everything from GWBasic to Prolog, so there is hardly going ot be a dearth of solutions submitted :o) ] /Bernie\ -- Bernie Cosell Fantasy Farm Fibers mailto:[EMAIL PROTECTED] Pearisburg, VA --> Too many people, too few sheep <--
