Adjust solvers to return integer

This commit is contained in:
Nettika
2023-12-16 16:44:55 -08:00
parent ffa9ebcf53
commit 54271e0a2c
7 changed files with 30 additions and 51 deletions

View File

@@ -62,23 +62,19 @@ def _recover_all_calibration_values(
)
def solve_part_1(input: str) -> str:
return str(
_recover_all_calibration_values(
input,
decimal_only_pattern,
decimal_only_pattern,
{},
)
def solve_part_1(input: str) -> int:
return _recover_all_calibration_values(
input,
decimal_only_pattern,
decimal_only_pattern,
{},
)
def solve_part_2(input: str) -> str:
return str(
_recover_all_calibration_values(
input,
left_decimal_and_words_pattern,
right_decimal_and_words_pattern,
number_word_map,
)
def solve_part_2(input: str) -> int:
return _recover_all_calibration_values(
input,
left_decimal_and_words_pattern,
right_decimal_and_words_pattern,
number_word_map,
)