day3 and 4

This commit is contained in:
2023-12-04 13:31:13 +00:00
parent e7cd9346f2
commit 56571eadf0
10 changed files with 664 additions and 7 deletions

View File

@@ -0,0 +1,37 @@
package day03
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestPart1(t *testing.T) {
r := Part1(
`467..114..
...*......
..35..633.
......#...
617*......
.....+.58.
..592.....
......755.
...$.*....
.664.598..`)
require.Equal(t, 4361, r)
}
func TestPart2(t *testing.T) {
r := Part2(
`467..114..
...*......
..35..633.
......#...
617*......
.....+.58.
..592.....
......755.
...$.*....
.664.598..`)
require.Equal(t, 467835, r)
}