mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Implement 2024 day 17 part 1
This commit is contained in:
5
2024/tests/samples/17.txt
Normal file
5
2024/tests/samples/17.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Register A: 729
|
||||
Register B: 0
|
||||
Register C: 0
|
||||
|
||||
Program: 0,1,5,4,3,0
|
||||
@@ -14,3 +14,14 @@ from . import get_data
|
||||
)
|
||||
def test_sample_part1(data: str, result: int) -> None:
|
||||
assert DayRunner.part1(data) == result
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"data,result",
|
||||
[
|
||||
(get_data(16, 1), 45),
|
||||
(get_data(16, 2), 64),
|
||||
],
|
||||
)
|
||||
def test_sample_part2(data: str, result: int) -> None:
|
||||
assert DayRunner.part2(data) == result
|
||||
|
||||
7
2024/tests/test_day17.py
Normal file
7
2024/tests/test_day17.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from aoc.days.day17 import DayRunner
|
||||
|
||||
from . import get_data
|
||||
|
||||
|
||||
def test_sample_part1() -> None:
|
||||
assert DayRunner.part1(get_data(17)) == "4,6,3,5,6,3,5,2,1,0"
|
||||
Reference in New Issue
Block a user