adventofcode/2017/02/1checksum.py
2025-07-24 18:36:34 +00:00

14 lines
397 B
Python
Executable File

#!/usr/bin/env python3
if __name__ == '__main__':
total = 0
with open("input", "r", encoding="utf-8") as sheet:
for line in sheet:
values = list(map(int, line.split()))
values.sort()
value_large = values[-1]
value_small = values[0]
difference = value_large - value_small
total += difference
print(total)