14
2020/08/22 23:48:00 2020/08/22 23:48:59
2020/08/22 23:48:59 2020/08/22 23:48:00
2020/08/22 23:22:
<463 bytes omitted>
用户输出
59
59
1537
82527
1032927
21164127
17902896185
-1
-1
-1
-1
-1
-1
315537897599
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#100829 | #112. czq的时间间隔 | Accepted | 100 | 250 ms | 4276 K | Python 3 / 417 B | ssh | 2023-10-24 9:59:14 |
from datetime import datetime
t0=datetime(year=1,month=1,day=1)
T=int(input())
for i in range(T):
s=input().split(" ")
try:
t1=datetime.strptime(s[0]+" "+s[1],"%Y/%m/%d %H:%M:%S")
d1=(t1-t0).total_seconds()
t2=datetime.strptime(s[2]+" "+s[3],"%Y/%m/%d %H:%M:%S")
d2=(t2-t0).total_seconds()
print(int(abs(d1-d2)))
except ValueError:
print("-1")
14
2020/08/22 23:48:00 2020/08/22 23:48:59
2020/08/22 23:48:59 2020/08/22 23:48:00
2020/08/22 23:22:
<463 bytes omitted>
用户输出
59
59
1537
82527
1032927
21164127
17902896185
-1
-1
-1
-1
-1
-1
315537897599
系统信息
Exited with return code 0
10000
5348/13/26 20:09:36 5809/10/09 11:17:33
8951/13/09 02:54:35 1245/10/20 19:37:36
7524/01/04 20:
<399906 bytes omitted>
-1
-1
52181193949
167527773820
11151421677
176367406636
34137847390
71087537213
156479412870
<102130 bytes omitted>
用户输出
-1
-1
52181193949
167527773820
11151421677
176367406636
34137847390
71087537213
156479412870
-1
-1
81508312928
163816674890
-1
6
<92102 bytes omitted>
系统信息
Exited with return code 0