aboutsummaryrefslogtreecommitdiff
path: root/challenge-106/stuart-little/python/ch-1.py
blob: 2a63047df2cd320d6a07da2a8932752b6c5083fe (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env python

# run <script> <space-separated numbers>

import sys

srt = sorted(map(lambda x: int(x), sys.argv[1:]))
diffs = [y-x for (x,y) in zip(srt,srt[1:])]

print(max(diffs) if len(diffs)>0 else 0)