Maximum possible common ratios
var raised = 1 / ( n - 1 ) ; var temp = Math . pow ( arr [ n - 1 ] , raised ) ; var r = Math . round ( temp ) + 1 ; var i , j , min_cost = 1000000000 ; var common_ratio = 1 ;