# [Tutor] hey... im a newbie.. trying to make a program that finds the lcm of multiple numbers numbers

Deirdre Saoirse deirdre@deirdre.net
Tue, 25 Jan 2000 16:52:38 -0800 (PST)

```On Sat, 10 Jan 1998, ryan mcmenamin wrote:

> Hey python community,
> I got it to count 2 numbers multiples.... now how do i get it to find
> the least multiple of each number.

In general, you want to find the prime numbers that constitute each of the
numbers (which you apparently have). Let's say the numbers are 18 and 15:

18 = 2 * 3 * 3
15 = 3 * 5

So you'd need to walk through the list of primes and make a list that
contained all the elements of both:

90 = 2 * 3 * 3 * 5

There are several ways of approaching this; why don't you show us what
you've done so far?

--
_Deirdre   *   http://www.linuxcabal.net   *   http://www.deirdre.net
"Mars has been a tough target" -- Peter G. Neumann, Risks Digest Moderator
"That's because the Martians keep shooting things down." -- Harlan Rosenthal
<Harlan.Rosenthal@Dialogic.com>, retorting in Risks Digest 20.60

```