Maximum possible common ratios
raised = 1 / ( n - 1 ) NEW_LINE temp = pow ( arr [ n - 1 ] , raised ) NEW_LINE r = round ( temp ) + 1 NEW_LINE min_cost = sys . maxsize NEW_LINE common_ratio = 1 NEW_LINE