fix comment
This commit is contained in:
@@ -56,10 +56,8 @@ if __name__ == "__main__":
|
|||||||
print(f"sum of priorities of all common items amongst compartments: {answer_a}")
|
print(f"sum of priorities of all common items amongst compartments: {answer_a}")
|
||||||
submit(answer_a, part="a", day=3, year=2022)
|
submit(answer_a, part="a", day=3, year=2022)
|
||||||
|
|
||||||
# part b: determine the priority of common items in groups of three
|
# part b: determine the priority of common items in groups of three and create a priority summary
|
||||||
# split the supply list into groups of three
|
|
||||||
groups = [supplies[i : i + 3] for i in range(0, len(supplies), 3)]
|
groups = [supplies[i : i + 3] for i in range(0, len(supplies), 3)]
|
||||||
# create a list of each groups priority and sum it all up
|
|
||||||
answer_b = sum([eval_badge_priority(group) for group in groups])
|
answer_b = sum([eval_badge_priority(group) for group in groups])
|
||||||
print(f"sum of priorities of all common items amongst groups of three: {answer_b}")
|
print(f"sum of priorities of all common items amongst groups of three: {answer_b}")
|
||||||
submit(answer_b, part="b", day=3, year=2022)
|
submit(answer_b, part="b", day=3, year=2022)
|
||||||
|
|||||||
Reference in New Issue
Block a user