fork download
  1. def f(t,z):i=int;r=60*(i(t[:2])+i(z[3:6]))+i(t[3:])+i(z[3]+z[7:]);print r/60%24,r%60
  2.  
  3. for testT, testZ in (("08:50","UTC-06:00"),("09:42","UTC+05:45"),("06:42","UTC+13:00"),("02:40","UTC-10:00"),("17:25","UTC+09:00")):
  4. print 'Input: "%s", "%s"' % (testT, testZ)
  5. f(testT, testZ)
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
Input: "08:50", "UTC-06:00"
2 50
Input: "09:42", "UTC+05:45"
15 27
Input: "06:42", "UTC+13:00"
19 42
Input: "02:40", "UTC-10:00"
16 40
Input: "17:25", "UTC+09:00"
2 25