python求助(听取WA声一片)

P1615 西游记公司

@[denghuolanshanchu](/user/893114) 你有没有考虑过减出来是负数的情况?所以要先把时间转化成以秒为单位,再相减
by _Haoomff_ @ 2022-12-30 16:55:50


有 @[_Haoomff_](/user/368111) 我的想法是既然TA变成负数了,那也就没有退位 那么效果还是一样的 对吗巨佬?
by denghuolanshan_1024 @ 2022-12-30 17:00:05


NO
by qhcKing @ 2022-12-30 17:08:29


@[denghuolanshanchu](/user/893114) 这边建议转换成秒做 我写的 ```python ph,pm,ps = map(int,input().split(':')) mh,mm,ms = map(int,input().split(':')) cps = int(input()) print(((mh*3600+mm*60+ms)-(ph*3600+pm*60+ps))*cps) ```
by mazichen @ 2022-12-30 20:25:05


感谢 @maizichen @[_Haoomff_](/user/368111)
by denghuolanshan_1024 @ 2022-12-31 14:32:28


|