思路
python做這題很簡單,靈活用datetime庫即可
code
import os
import sys# 請在此輸入您的代碼
import datetimestart = datetime.datetime(1970,1,1,0,0,0)
for _ in range(int(input())):ls = input().split()end = datetime.datetime.strptime(ls[0]+ls[1],"%Y-%m-%d%H:%M:%S")x = int(ls[2])n = (end-start)// datetime.timedelta(minutes=x)ans = (start + n * datetime.timedelta(minutes = x)).strftime("%Y-%m-%d %H:%M:%S")print(ans)