@Test public void test2() { int origin = 16384; int count = 3; int[] result = Utils.splitNumber(origin, count); assertArrayEquals(new int[]{ 0, 5461, 10922, 16384 }, result); }
public static int[] splitNumber(int origin, int count) { int[] result = new int[count + 1]; result[0] = 0; result[count] = origin; int seed = origin / count; for (int i = 1; i < count; i++) { result[i] = seed * i; } return result; }
Utils { public static int[] splitNumber(int origin, int count) { int[] result = new int[count + 1]; result[0] = 0; result[count] = origin; int seed = origin / count; for (int i = 1; i < count; i++) { result[i] = seed * i; } return result; } }
Utils { public static int[] splitNumber(int origin, int count) { int[] result = new int[count + 1]; result[0] = 0; result[count] = origin; int seed = origin / count; for (int i = 1; i < count; i++) { result[i] = seed * i; } return result; }  }
Utils { public static int[] splitNumber(int origin, int count) { int[] result = new int[count + 1]; result[0] = 0; result[count] = origin; int seed = origin / count; for (int i = 1; i < count; i++) { result[i] = seed * i; } return result; }  static int[] splitNumber(int origin, int count); }
Utils { public static int[] splitNumber(int origin, int count) { int[] result = new int[count + 1]; result[0] = 0; result[count] = origin; int seed = origin / count; for (int i = 1; i < count; i++) { result[i] = seed * i; } return result; }  static int[] splitNumber(int origin, int count);  }