kot_mapku3

1 F

Jun 2nd, 2020
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.  
  9.     int HS, MS;
  10.     int HL, ML;
  11.     int HB, MB;
  12.     int N;
  13.  
  14.     cin >> HS >> MS;
  15.     cin >> HL >> ML;
  16.     cin >> HB >> MB;
  17.     cin >> N;
  18.  
  19.     int SUM = HS * 60 + MS + (HL * 60 + ML) * N + (HB * 60 + MB) * (N-1);
  20.     cout << SUM / 60 % 24 << " " << SUM % 60;
  21.  
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment