Solution to problem 9 in Python
This commit is contained in:
parent
1e1d2c5ad7
commit
10d00c5e12
|
@ -148,7 +148,9 @@ def part_2() -> None:
|
|||
continue
|
||||
res.append(bassin([pos], {pos}))
|
||||
|
||||
print(prod(sorted(res)[-3:]))
|
||||
largest_basin = prod(sorted(res)[-3:])
|
||||
|
||||
print(f"The product of the three largest basins is {largest_basin}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue