import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int m = sc.nextInt();
if (m < 45) {
if (h == 0) {
h = 23;
m += 15;
}
else {
h -= 1;
m += 15;
}
}
else {
m -= 45;
}
System.out.println(h + " " + m);
sc.close();
}
}'Algorithm > 백준+프로그래머스+SWEA+정올+구름' 카테고리의 다른 글
| [Algorithm] 백준 10250 ACM 호텔 (0) | 2021.03.25 |
|---|---|
| [Algorithm] 백준 2577 숫자의 개수 (0) | 2021.03.25 |
| [Algorithm] 백준 2753 윤년 (0) | 2021.03.25 |
| [Algorithm] 백준 10871 X 보다 작은 수 (0) | 2021.03.24 |
| [Algorithm] 백준 2739 구구단 (0) | 2021.03.24 |