Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main() {
- int HS, MS;
- int HL, ML;
- int HB, MB;
- int N;
- cin >> HS >> MS;
- cin >> HL >> ML;
- cin >> HB >> MB;
- cin >> N;
- int SUM = HS * 60 + MS + (HL * 60 + ML) * N + (HB * 60 + MB) * (N-1);
- cout << SUM / 60 % 24 << " " << SUM % 60;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment