Question

30, 40 and 'n' are such that every number is a factor of the product of other 2 number. If 'n' is a positive integer , what is the difference between the maximum value of 'n' and the minimum value of 'n'?

Now, since it says that n is a factor of the product of the other 2 numbers, the max value that n can take is 1200 right?

i guess the hcf will give the minimum value of n

Listing the factors of 30 and 40

30 -> 1,2,3,5,6,10,15,30

40 -> 1,2,4,5,8,10,20,40

hcf(30,40) -> 10

Therfore, the difference is 1200-10 => 1190..

But the answer that is given is 1188...where am i going wrong?

Était-ce utile?

La solution

Your approach is wrong. The greatest common divisor of 30 and 40 is not your smallest n.

You are looking for the smallest integer n > 0 that satisfies 40*n = 0 (mod 30) and 30*n = 0 (mod 40).

For the first equation, the result is n_1 = 3. For the second equation, we get n_2 = 4. The smallest n to satisfy both equations is the least common multiple of n_1 and n_2 -- in this case, n = 12.

Autres conseils

hcf(30,40) -> 12

30=2*3*5

40=2*2*2*5

So, hcf(30,40) -> 3*2*2=12

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top