#include #define rep(i,a,b) for(int i=a;i<(b);++i) #define erep(i,a,b) for(int i=a;i<=(int)(b);++i) #define per(i,a,b) for(int i=(a);i>(b);--i) #define eper(i,a,b) for(int i=(a);i>=b;--i) #define pb push_back #define mp make_pair #define INF (1<<31)-1 #define MOD 1000000007 #define all(x) (x).begin(),(x).end() #define vii vector #define vll vector using namespace std; typedef long long ll; typedef pair Pii; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> a >> b >> s; int utc_time = a - 9; double utc_munite = b; double diff = stod(s.substr(4, s.size()-4)); if (s[3] == '-') diff = -diff; utc_time += (int)floor(diff); utc_munite += 60.0 * (diff - floor(diff)); if (utc_munite > 59) { utc_time += utc_munite / 60; } if (utc_time < 0) { utc_time = 24 + utc_time; } else if (23 < utc_time) { utc_time -= 24; } int munite = (int)round(utc_munite) % 60; cout << (utc_time < 10 ? "0" + to_string(utc_time) : to_string(utc_time)) << ":" << (munite < 10 ? "0" + to_string(munite) : to_string(munite)) << endl; return 0; }