We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bfdcea commit 5eda897Copy full SHA for 5eda897
puzzles/solutions/2023/d03/p2.py
@@ -1,8 +1,14 @@
1
import sys
2
3
+from schematic_parser import SchematicParser
4
+
5
6
def get_answer(input_text: str):
- raise NotImplementedError
7
+ """Return the sum of all gear ratios in the engine schematic."""
8
+ schematic_parser = SchematicParser(input_text)
9
+ schematic_parser.find_part_numbers()
10
+ schematic_parser.find_gears()
11
+ return schematic_parser.calculate_gear_ratios_sum()
12
13
14
if __name__ == "__main__":
0 commit comments