https://www.acmicpc.net/problem/2884
입력 받을 때 0 -> 24
출력 할 때 24 -> 0
#include <iostream>
#include <string>
#include <stdio.h>
#include <vector>
using namespace std;
int main(void) {
int h, m;
int time;
cin >> h;
if(h == 0) {
h = 24;
}
cin >> m;
time = 60 * h + m;
time = time - 45;
h = time / 60;
if(h == 24) {
h = 0;
}
m = time % 60;
printf("%d %d", h, m);
return 0;
}