以下是代码:
#include <iostream> using namespace std; int main(){ int a, b, c, d, e, f, g; char m; cin >> a >> m >> b >> m >> c >> d >> m >> e >> m >> f >> g; cout << ((d*3600+e*60+f)-(a*3600+b*60+c))*g; return 0; }