#include<bits/stdc++.h> using namespace std; int main() { int a1, a2, a3, b1, b2, b3; scanf("%d:%d:%d",&a1,&a2,&a3); scanf("%d:%d:%d",&b1,&b2,&b3); int a = a1*3600 + a2*60 + a3; int b = b1*3600 + b2*60 + b3; cout << a-b; return 0; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account