You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package cap3
|
|
|
|
// Work11 求n!结果中0的数量
|
|
func Work11(n int) int {
|
|
count := 0
|
|
for i := 1; i <= n; i++ {
|
|
for num := i; num%5 == 0; num /= 5 {
|
|
count++
|
|
}
|
|
}
|
|
|
|
return count
|
|
}
|
|
|