思路解答 思路 仅有2 * 5才能得末尾有0;2的个数比5的个数多很多,所以,即是有因数中5的个数。 解答public class Solution { public int trainingZeros(int n) { int ans = 0; while (n > 0) { ans += n / 5; n = n / 5; } return ans; }}