回答編集履歴
1
誤字修正
test
CHANGED
@@ -12,11 +12,11 @@
|
|
12
12
|
|
13
13
|
let array_length = array.length;
|
14
14
|
|
15
|
-
let min_len = Math.floor(array_length /
|
15
|
+
let min_len = Math.floor(array_length / total_split); // 切り捨て
|
16
16
|
|
17
|
-
let rest = array_length %
|
17
|
+
let rest = array_length % total_split; //余り
|
18
18
|
|
19
|
-
let max_len = min_len + 1;
|
19
|
+
let max_len = min_len + 1; //余りの数はtotal_split未満になるので1づつ割り振れば良い
|
20
20
|
|
21
21
|
let max_num = rest;
|
22
22
|
|