adventofcode/2018/internal/day09/util.go
2018-12-11 19:11:45 -05:00

26 lines
360 B
Go

package day09
import (
"strconv"
"strings"
"internal/util"
)
func ParseInput() (int, int) {
rawData := strings.TrimSpace(util.ReadInput()[0])
data := strings.Split(rawData, " ")
players, err := strconv.Atoi(data[0])
if err != nil {
panic(err)
}
lastNum, err := strconv.Atoi(data[6])
if err != nil {
panic(err)
}
return players, lastNum
}