#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> a >> b; string s; cin >> s; double d = stod(s.substr(3)); d -= 9; d += 24; d += 0.001; // 誤差対策 ll minutes = 60 * d; a += minutes / 60; b += minutes % 60; if(b>=60){ b -= 60; a += 1; } a %= 24; printf("%02d:%02d\n", a, b); return 0; }