2025: improve folder names

This commit is contained in:
2024-12-19 14:02:43 +01:00
parent 9bca1dddca
commit dc7e94b7aa
21 changed files with 0 additions and 0 deletions

15
2024/01/1.py Normal file
View File

@ -0,0 +1,15 @@
import numpy as np
# Load both columns into numpy arrays of type int
left, right = np.loadtxt("input", dtype=int).T
# Sort both lists (ASC)
left.sort()
right.sort()
# Just calculate the distances.
distances = np.abs(left - right)
distance = np.sum(distances)
print(f"The total distance is {distance}.")