chsw1992   1년 전

#include

using namespace std;

int main()

{

int h;

int m;

cin >> h >> m;

if (h <= 0)

{

cout << h + 23 << " " << 60 - (45 - m) << endl;

}

else if (m-45 < 0)

{

cout << h-1 << " " << 60 - (45 - m) << endl;

}

else if (m - 45 == 0)

{

cout << h << " " << m - 45 << endl;

}

}

seawon0808   1년 전

반례: 23 59

댓글을 작성하려면 로그인해야 합니다.