adventofcode/2018/internal/day09/util.go

26 lines
360 B
Go
Raw Normal View History

2018-12-12 00:11:45 +00:00
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
}