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);  }
@Test public void test() { int origin = 16384; int count = 4; int[] result = Utils.splitNumber(origin, count); assertArrayEquals(new int[]{ 0, 4096, 8192, 12288, 16384 }, result); }
@Test public void test2() { int origin = 16384; int count = 3; int[] result = Utils.splitNumber(origin, count); assertArrayEquals(new int[]{ 0, 5461, 10922, 16384 }, result); }