// yukicoder: No.525 二度寝の季節 // 2019.4.18 bal4u #include #include #define gc() getchar() int in() { int n = 0, c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (isdigit(c)); return n; } int main() { int t = (in()*60+in()+5) % 1440; printf("%02d:%02d\n", t/60, t%60); return 0; }