# SPUG: Re: FW: Help..Any Math GENIUS out there?

Ken Clarke kenslinux at shaw.ca
Thu Jul 25 17:00:15 CDT 2002

```Cute little afternoon distraction.  I used a brute force approach because
I'd rather spend 2 minutes of computer time running the program than 20
minutes of my time determining and implementing a more elegant solution.

There were 14 possible solutions.  Here's your result set:

A B C D E
24 3 8 28 17
24 3 18 27 17
24 3 28 26 17
24 13 7 28 17
24 13 17 27 17
24 13 27 26 17
24 23 6 28 17
24 23 16 27 17
24 23 26 26 17
24 23 36 25 17
24 33 5 28 17
24 33 15 27 17
24 33 25 26 17
24 33 35 25 17

>> Ken Clarke
>> Contract Web Programmer / E-commerce Technologist
>> www.perlprogrammer.net :: www.modperldev.com

----- Original Message -----
From: "Orr, Chuck (NOC)" <chuck.orr at attws.com>
To: <spug-list at pm.org>
Sent: July 25, 2002 10:50 AM
Subject: SPUG: FW: Help..Any Math GENIUS out there?

>
>
> > Hello,
> >
> > I am hoping to use Perl to solve an equation like the below:
> >
> > A + (36*B) + (360*C) + (3600*D) + (129600*E) = 2,307,012
> >
> > I know that each of the variables A - E is a whole number in the range
> > 1-36.
> >
> > Could I load those numbers (1 -36) in an array and substitute each
number
> > for each variable until this is solved?
> >
> > Any ideas would be greatly appreciated.
> >
> >
> > Thanks,
> > Chuck Orr
> > AT&T Wireless Services
> > 425 288 2386
> > chuck.orr at attws.com
>
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
>  For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL