package day_07 import ( "strconv" "strings" ) type Equation struct { Result int Variables []int } // task:https://adventofcode.com/2024/day/7 func SolveBasic(input string) int { equations := loadEquations(input) sum := 0 for _, equation := range equations { if Solvable(equation) { sum += equation.Result } } return sum } func Solvable(equation Equation) bool { for i := 0; i < 1<<(len(equation.Variables)-1); i++ { if solvable(equation, i) { return true } } return false } func solvable(equation Equation, options int) bool { sum := equation.Variables[0] for i := 0; i < len(equation.Variables)-1; i++ { if sum > equation.Result { return false } if options&(1<