26 lines
360 B
Go
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
|
||
|
}
|