#include int main() { int time = 0; int sec = 0; scanf("%d%d",&time,&sec); sec = sec + 5; switch (sec) { case 64: sec = 4; time++; break; case 63: sec = 3; time++; break; case 62: sec = 2; time++; break; case 61: sec = 1; time++; break; case 60: sec = 0; time++; default: break; } if(time < 23 && sec >59) { time =0; } else if(time > 23) { time = 1; } printf("%02d:%02d\n", time,sec); return 0; }