Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int tm1, ts1, tm2, ts2;
- cin >> tm1 >> ts1 >> tm2 >> ts2;
- int dm1, ds1, dm2, ds2;
- cin >> dm1 >> ds1 >> dm2 >> ds2;
- int vkupno_tufi = tm1 * 60 + ts1 + tm2 * 60 + ts2;
- int vkupno_dvojce = dm1 * 60 + ds1 + dm2 * 60 + ds2;
- if(vkupno_tufi < vkupno_dvojce) {
- cout << "T" << endl;
- }
- else {
- cout << "D" << endl;
- }
- int raz = abs(vkupno_tufi - vkupno_dvojce);
- cout << (raz / 60) << " " << (raz % 60) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement