Well if you multiply all array elements, you may not be able to fit it in any data type.
I have better approach lets say all the elements have some factors if we map all these factors together, we should get number of ith factor a multiple of n.
This is same as taking nth root.
Well if you multiply all array elements, you may not be able to fit it in any data type.
I have better approach lets say all the elements have some factors if we map all these factors together, we should get number of ith factor a multiple of n.
This is same as taking nth root.