int a, b, h, m, s;char x1, x2, y1, y2;cin >> a >> b;s = a*60 + b + 150;h = (s/60)%24;m = s%60;x1 = h/10 + '0';x2 = h%10 + '0';y1 = m/10 + '0';y2 = m%10 + '0';cout << x1<<x2 << ':' << y1<<y2;
呵呵我好懶:)