import java.util.Arrays; import java.util.Scanner; /** * yukicoder no.31 * @author scache * */ public class Main { public static void main(String[] args) { Main p = new Main(); } public Main() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long v = sc.nextLong(); long[] c = new long[n]; for(int i=0;i c[i]*(curTotal%(j-i+1)) + costSum[j]*(curTotal/(j-i+1))){ liter[i] = curTotal%(j-i+1)+curTotal/(j-i+1); Arrays.fill(liter, i+1, j+1, curTotal/(j-i+1)); isChanged = true; curCost = c[i]*(curTotal%(j-i+1)) + costSum[j]*(curTotal/(j-i+1)); // System.out.println(Arrays.toString(liter)); } } } } long res = 0; for(int i=0;i