我在python3中的代码有问题,我在URI在线判断中提交错误,答案错误(5%),但我不知道为什么,请帮助我;-; https://www.urionlinejudge.com.br/judge/en/
ohayou,itadakimasu,哈哈
def event_time():
trash, day1 = input().split()
day1 = int(day1)
h1, trash1, m1, trash2, s1 = input().split()
h1 = int(h1)
m1 = int(m1)
s1 = int(s1)
trash, day2 = input().split()
day2 = int(day2)
h2, trash1, m2, trash2, s2 = input().split()
h2 = int(h2)
m2 = int(m2)
s2 = int(s2)
s_total = 0
m_total = 0
h_total = 0
d_total = 0
if s2 - s1 < 0:
s_total += s2 - s1 + 60
m_total -= 1
else:
s_total += s2 - s1
if m2 - m1 < 0:
m_total += m2 - m1 + 60
h_total -= 1
else:
m_total += m2 - m1
if h2 - h1 < 0 :
h_total = h2 - h1 + 24
d_total -= 1
else:
h_total += h2 - h1
d_total += day2 - day1
print("%d dia(s)" % d_total)
print("%d hora(s)" % h_total)
print("%d minuto(s)" % m_total)
print("%d segundo(s)" % s_total)
event_time()