#include #include #include #include int main(int argc, char** argv) { std::string input = argv[1]; std::stringstream ss(input); std::string buffer; int hour; int min; getline(ss, buffer, ':'); hour = std::stoi(buffer); getline(ss, buffer, ':'); min = std::stoi(buffer); min += 5; if (min > 59) { min -= 60; hour++; if (hour > 23) { hour -= 24; } } std::cout << std::setfill('0') << std::setw(2) << hour << ":"; std::cout << std::setfill('0') << std::setw(2) << min << std::endl; }