Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Go
/ Problem17
Function
Problem17
project_euler/problem_17/problem17.go:21–31 ·
view source on GitHub ↗
(input string)
Source
from the content-addressed store, hash-verified
19
import
"strings"
20
21
func
Problem17(input string) int {
22
var
sum int
23
24
parsed := strings.Split(input,
" "
)
25
26
for
_, word :=
range
parsed {
27
sum += len(word)
28
}
29
30
return
sum
31
}
Callers
2
TestProblem17_Func
Function · 0.85
BenchmarkProblem17_Func
Function · 0.85
Calls
1
Split
Method · 0.80
Tested by
2
TestProblem17_Func
Function · 0.68
BenchmarkProblem17_Func
Function · 0.68