Advertisement
vlatkovski

Tufi i Dvojce

Oct 5th, 2017
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int tm1, ts1, tm2, ts2, dm1, ds1, dm2, ds2;
  6.     cin >> tm1 >> ts1 >> tm2 >> ts2 >> dm1 >> ds1 >> dm2 >> ds2;
  7.     int t = tm1*60+ts1 + tm2*60+ts2;
  8.     int d = dm1*60+ds1 + dm2*60+ds2;
  9.     if (t < d) {
  10.         cout << "T\n";
  11.     }
  12.     else {
  13.         cout << "D\n";
  14.     }
  15.     int rsvk = abs(t-d);
  16.     cout << rsvk/60 << " " << rsvk%60 << endl;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement