you give array integer num you give integer original number need search numsyou follow stepsIf original find num multiply ie set original 2 originalotherwise stop processRepeat process new number long find numberreturn final value original Example 1input num 536112 original 3output 24explanation 3 find num 3 multiply 2 obtain 6 6 find num 6 multiply 2 obtain 12 12 find num 12 multiply 2 obtain 24 24 find num thus 24 returnedExample 2input num 279 original 4Output 4explanation 4 find num thus 4 return Constraints1 numslength 10001 numsi original 1000