| ||You are given a int divisors containing K elements. Find a positive integer n such that exactly K-1 elements of divisors are exact divisors of n. If there are several such numbers n, return the smallest possible one. If no such number n exists, return -1 instead.|
|Method signature:||int getMinimum(int divisors)|
|(be sure your method is public)|
|-||A number x is an exact divisor of y if y divided by x yields an integer result.|
|-||If x is an exact divisor of y then we call y a multiple of x.|
|-||divisors will contain between 2 and 6 elements, inclusive.|
|-||Each element of divisors will be distinct.|
|-||Each element of divisors will be between 1 and 15, inclusive.|
|There are many possible values for n in this case. For example: 6, 15, 75 and 12. 6 is the smallest of them.
|Every multiple of 3 and 2 is also a multiple of 6.|
Every multiple of 6 is also a multiple of 2 and 3.
Therefore, a number that is a multiple of exactly 2 out of the three elements in this array cannot exist.
This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2010, TopCoder, Inc. All rights reserved.