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

Function Problem13

project_euler/problem_13/problem13.go:114–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114func Problem13() string {
115 sum := "0"
116
117 for _, n := range numbers {
118 sum = add(sum, n)
119 }
120
121 return sum[:10]
122}
123
124func add(a, b string) string {
125 if len(a) < len(b) {

Callers 2

TestProblem13_FuncFunction · 0.85
BenchmarkProblem13_FuncFunction · 0.85

Calls 1

addFunction · 0.85

Tested by 2

TestProblem13_FuncFunction · 0.68
BenchmarkProblem13_FuncFunction · 0.68