// (waitNum + n - 1) / n 向上取整 int costTime = taskLength + (waitNum + n - 1) / n; + n -1 是什么作用呢? 来个大神说一下呗 没理解,为啥不用 int costTime = taskLength + Math.ceil((double) waitNum / n)