标签:
Given an integer n, return the number of trailing zeroes in n!.
给一个数字n,返回它n!数字后面有多少个0。
public class Solution { public int trailingZeroes(int n) { int count=0; while(n/5>=1) { count+=n/5; n/=5; } return count; } }
标签:
原文地址:http://www.cnblogs.com/sweetculiji/p/4779901.html