Relógio

Problem Link

Solution by Mr.Olimpia100 pts

Code / Notes

#include <bits/stdc++.h>
using namespace std;

int main(){
    int h, m, s, T;
    cin >> h >> m >> s >> T;
    int x = (T+s)/60;
    int y = (x+m)/60;
    int a = x+m-60*y;
    int b = T+s-x*60;
    int c = (h+y)/24;
    int d = h+y-c*24;
    cout << d << endl << a << endl << b;

}

Last updated 1 week, 1 day ago


« Back to problem