Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
421 B
1
Indexable
Never
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main()
{
    ios_base::sync_with_stdio(false);
    int h, m, s;
    int m1, s1;
    cin >> h >> m >> s;
    cin >> m1 >> s1;
    s += s1;
    if(s >= 60) {
        m++;
        s %= 60;
    }
    m += m1;
    if(m >= 60) {
        h++;
        m %= 60;
    }
    cout << h << " " << m << " " << s << endl;
    return 0;
}