1
2
3
4
5
6
7
8
9
10
11
12
13
|
a1,b1,c1=map(int, input().split(":"))
a2,b2,c2=map(int, input().split(":"))
ans1=a1*3600+b1*60+c1
ans2=a2*3600+b2*60+c2
if ans1>=ans2 : ans2+=3600*24
ans3=ans2-ans1
a3=ans3//3600
ans3%=3600
b3=ans3//60
ans3%=60
c3=ans3
print("%02d:%02d:%02d"%(a3,b3,c3))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 2864 5와 6의 차이 (0) | 2021.07.20 |
---|---|
Leetcode 1859. Sorting the Sentence (0) | 2021.07.16 |
Leetcode 1913. Maximum Product Difference Between Two Pairs (0) | 2021.07.16 |
Leetcode 1486. XOR Operation in an Array (0) | 2021.07.16 |
Leetcode 1791. Find Center of Star Graph (0) | 2021.07.16 |
댓글