我怀疑老师有个地方是不是写错了?
1.ceil是最大返回最大参数的最小整数 2.floor()是返回最大值的最小整数; 可是我查了一下api,上面写的是这句话 Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer. Special cases: If the argument value is already equal to a mathematical integer, then the result is the same as the argument. 写的是返回最大的值是的整数