Solution to problem 9 in Python

This commit is contained in:
David Doblas Jiménez 2022-05-01 20:48:47 +02:00
parent 1e1d2c5ad7
commit 10d00c5e12
1 changed files with 3 additions and 1 deletions

View File

@ -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__":