Given input x,and array [a1,a2,a3..an], is it possible to find max number of which x is factor in log(n) time.
For example x = 2,
array is sorted, [1,2,4,4,9,13,18],
Here maximum number of which x is factor is 18. Is it possible to find 18 in log(n) time.