MCPcopy Create free account
hub / github.com/TheAlgorithms/C / count_divisors

Function count_divisors

project_euler/problem_12/sol1.c:19–30  ·  view source on GitHub ↗

* Get number of divisors of a given number * * If \f$x = a \times b\f$, then both \f$a\f$ and \f$b\f$ are divisors of * \f$x\f$. Since multiplication is commutative, we only need to search till a * maximum of \f$a=b = a^2\f$ i.e., till \f$\sqrt{x}\f$. At every integer till * then, there are eaxctly 2 divisors and at \f$a=b\f$, there is only one * divisor. */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected