#include int main(){ int h,m,s,oh,om,os; scanf("%d %d %d",&h, &m, &s); if(h<0 || h>23 || m<0 || m>59 || s<0 || s>59){ printf("Nekorektni podaci.\n"); return 0; } os = 60-s; om = 60-m; oh = 24-h; if(s>0) om--; if(m>0) oh--; printf("%d %d %d\n",oh,om,os); return 0; }