We are provided with a positive number N which denotes that we have N objects . Each of those N objects hold a value.
Now we are provided a task to add non-negative value to the objects in such a way that the resultant values of N objects have a common factor .
Find the minimum sum of all the numbers added.
For example :-
Suppose N = 3
and we have objects with values as:-
11 ,21 ,24
The answer to this is 1 as we can add 1 to 11 , and thus resultant values become
12, 21, 24 ,
which have 3 as common factor .