Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 6 lines (5 sloc) 174 Bytes
def sum = 0L
new File('../data/euler-022.txt').readLines().sort().eachWithIndex {name, pos ->
sum += (pos + 1) * name.chars.inject(0, {s, c -> s + c - 64})
}
println sum
Jump to Line
Something went wrong with that request. Please try again.