MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / numDivisors

Function numDivisors

project_euler/problem_12/problem12.go:38–46  ·  view source on GitHub ↗
(n uint)

Source from the content-addressed store, hash-verified

36}
37
38func numDivisors(n uint) uint {
39 divisors := uint(0)
40 for i := uint(1); i*i <= n; i++ {
41 if n%i == 0 {
42 divisors += 2
43 }
44 }
45 return divisors
46}

Callers 1

Problem12Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected