scientific_comp_projects/CODE/[python]kattis/trivial/parking.py
2021-10-29 15:16:40 +02:00

16 lines
332 B
Python

tests = int(input())
value = []
for i in range(tests):
stores = int(input())
positions = input()
positions = positions.split(' ')
position_int = []
for position in positions:
position_int.append(int(position))
value.append((max(position_int)-min(position_int))*2)
for val in value:
print(val)