Day 1 (fixed part 2)

This commit is contained in:
Sebastian Seedorf
2020-12-01 22:32:01 +01:00
parent 7c19b98694
commit eea7f1b29d

View File

@@ -7,8 +7,8 @@ COUNT = 3
for vals in combinations(items, 3):
if sum(vals) == 2020:
print("Found {} and {} and {}: Sum={} Product={}".format(
*vals,
print("Found [{}]: Sum={}, Product={}".format(
", ".join(map(str, vals)),
sum(vals),
math.prod(vals)
))