Last active
January 29, 2020 13:53
-
-
Save hackaugusto/42837d20db696e53dd2797404473ab70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import datetime | |
first = None | |
largest_gap = datetime.timedelta(0) | |
start = None | |
end = None | |
for l in sys.stdin: | |
second = datetime.datetime.fromisoformat(l.strip()) | |
if first: | |
gap = second - first | |
if gap > largest_gap: | |
start = first | |
end = second | |
largest_gap = gap | |
first = second | |
print(f"{start} | {end} | {largest_gap}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment