def test_part_1(self): universe = data_input("data/aoc_12_data_test_1.txt") result = part_1(universe, 10) self.assertEqual(result, 179) universe = data_input("data/aoc_12_data_test_2.txt") result = part_1(universe, 100) self.assertEqual(result, 1940)
def test_part_2(self): universe = data_input("data/aoc_12_data_test_1.txt") result = part_2(universe) self.assertEqual(result, 2772) universe = data_input("data/aoc_12_data_test_2.txt") result = part_2(universe) self.assertEqual(result, 4686774924)
def main() -> None: data = data_input("data/aoc_12_data.txt") # Part 1 p_1 = part_1(data) print(f"Part 1: {p_1} is {p_1 == 288}") # Part 2 p_2 = part_2(data) print(f"Part 2: {p_2} is {p_2 == 211}")
def test_part_1(self): """""" data = data_input("data/aoc_12_data_test.txt") self.assertEqual(part_1(data), 6)
""" aoc_12 https://adventofcode.com/2017/day/12 """ from libs.aoc_12_lib import data_input, part_1, part_2 DATA: str = data_input("data/aoc_12_data.txt") # Part 1 PART_1: int = part_1(DATA) print(f"Part 1: {PART_1} is {PART_1 == 288}") # Part 2 PART_2: int = part_2(DATA) print(f"Part 2: {PART_2} is {PART_2 == 211}")
def test_part_2(self): """""" data: str = data_input("data/aoc_12_data_test.txt") self.assertEqual(part_2(data), 2)