package adventoc2024 import ( "io" "regexp" "strings" ) type Day3 struct{} func (d Day3) Part1(r io.Reader) string { var bd strings.Builder var sum int io.Copy(&bd, r) re := regexp.MustCompile(`mul\((\d{1,3}),(\d{1,3})\)`) matches := re.FindAllStringSubmatch(bd.String(), -1) for _, match := range matches { sum += atoi(match[1]) * atoi(match[2]) } return printi(sum) } func (d Day3) Part2(r io.Reader) string { return "" }