You are viewing a single comment's thread. Return to all comments →
import os from datetime import datetime as dt def time_delta(t1, t2): fmt = "%a %d %b %Y %H:%M:%S %z" deltaSeconds = abs((dt.strptime(t1, fmt)- dt.strptime(t2, fmt)).total_seconds()) return str(int(deltaSeconds)) if __name__ == '__main__': with open(os.environ['OUTPUT_PATH'], 'w') as fptr: for t_itr in range(int(input())): t1 = input() t2 = input() fptr.write(time_delta(t1, t2) + '\n')
Seems like cookies are disabled on this browser, please enable them to open this website
Time Delta
You are viewing a single comment's thread. Return to all comments →