#include<bits/stdc++.h> using namespace std; int main() { int h,m,s,k; cin>>h>>m>>s>>k; if(k>=60) { if(k==3600) { cout<<h-1<<m<<s; } else { int n=k/60; int t=k-(k/60*60); cout<<h<<m-n<<s-t; } } return 0; }
Using your lizikid universal account