/** * the number of 0 * @param n long长整型 the number * @return long长整型 */ func thenumberof0( n int64 ) int64 { var res, i int64 = 0, 5 for i <= n { res += n / i i *= 5 } return res }
package main
/**
* the number of 0
* @param n long长整型 the number
* @return long长整型
*/
func thenumberof0( n int64 ) int64 {
// write code here
var res int64
res = 0
for n > 0 {
n /= 5
res += n
}
return res
}