#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>N>>H>>M>>T; M += T*(N-1); H += M/60; M%=60; H%=24; cout<