aoc21/d6/common.go

15 lines
188 B
Go
Raw Permalink Normal View History

2022-02-21 22:28:30 +02:00
package d6
import "strconv"
func toNum(in []string) []int {
nums := make([]int, len(in))
for idx, str := range in {
num, _ := strconv.Atoi(str)
nums[idx] = num
}
return nums
}