mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
14 lines
158 B
Go
14 lines
158 B
Go
package main
|
|
|
|
func mulGood(xs []int) int {
|
|
res := 1
|
|
for i := 0; i < len(xs); i++ {
|
|
x := xs[i]
|
|
res *= x
|
|
if res == 0 {
|
|
return 0
|
|
}
|
|
}
|
|
return res
|
|
}
|