提交时间:2020-08-22 14:27:48

运行 ID: 6076

#include <iostream> #include <cmath> #include <cstdio> using namespace std; int main() { int a,b,c,d, first, last, cha, hour=0; cin>>a>>b>>c>>d; first = a*60+b; last = c*60+d; cha = last-first; while(cha>59) { cha -= 60; hour++; } cout<<hour<<" "<<cha; }