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

Function Problem5

project_euler/problem_5/problem5.go:13–23  ·  view source on GitHub ↗
(limit uint)

Source from the content-addressed store, hash-verified

11package problem5
12
13func Problem5(limit uint) uint {
14 n := limit * limit
15
16 for {
17 if isDivisible(n, limit) {
18 return n
19 }
20
21 n++
22 }
23}
24
25func isDivisible(n, limit uint) bool {
26 for i := uint(1); i <= limit; i++ {

Callers 2

TestProblem5_FuncFunction · 0.85
BenchmarkProblem5Function · 0.85

Calls 1

isDivisibleFunction · 0.85

Tested by 2

TestProblem5_FuncFunction · 0.68
BenchmarkProblem5Function · 0.68