Day 1 (fixed part 2)
This commit is contained in:
@@ -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)
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user