mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-25 03:11:41 +08:00
9 lines
116 B
Go
9 lines
116 B
Go
package leetcode
|
|
|
|
func trailingZeroes(n int) int {
|
|
if n/5 == 0 {
|
|
return 0
|
|
}
|
|
return n/5 + trailingZeroes(n/5)
|
|
}
|