mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-19 03:23:27 +02:00
2015-day24 code pulled into algos and mathy packages
This commit is contained in:
@@ -33,3 +33,11 @@ func SumIntSlice(nums []int) int {
|
||||
}
|
||||
return sum
|
||||
}
|
||||
|
||||
func MultiplyIntSlice(nums []int) int {
|
||||
product := 1
|
||||
for _, n := range nums {
|
||||
product *= n
|
||||
}
|
||||
return product
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user