29 lines
679 B
Python
29 lines
679 B
Python
#!/bin/python3
|
|
import sys
|
|
from pprint import pprint
|
|
|
|
input_f = "input" #sys.argv[1]
|
|
sum = 0
|
|
with open(input_f) as file:
|
|
for line in file:
|
|
line = list(map(int,line.rstrip('\n').split()))
|
|
#########################################
|
|
# #
|
|
# Part 1 #
|
|
# #
|
|
#########################################
|
|
|
|
sum+=(max(line)-min(line))
|
|
|
|
print(sum)
|
|
|
|
|
|
#########################################
|
|
# #
|
|
# Part 2 #
|
|
# #
|
|
#########################################
|
|
|
|
|
|
|