hackathon/question/q02/part2.go

13 lines
155 B
Go

package q02
func solveP2(ships []int) int64 {
lcm := solveP1(ships)
var res int64
for _, v := range ships {
res += lcm / int64(v)
}
return res
}