#19692: 用字元輸出 直接省掉一堆判斷歐耶:)


d10831312@gapps.fg.tp.edu.tw (偶素杉杉 (*゚∀゚*))


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;

呵呵我好懶:)