#include int main(void){ int hh, mm; scanf("%d%d", &hh, &mm); if((hh >= 0 && hh <= 23) && (mm >= 0 && mm <= 59)){ if(mm + 5 > 59){ hh = hh +1; if(hh + 1 > 23){ hh = 0; }else{ hh = hh +1; } mm = mm - 60; }else{ mm = mm + 5; } } printf("%02d:%02d\n", hh, mm); }