728x90
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] str = br.readLine().split(" ");
int add = Integer.parseInt(br.readLine());
int h = Integer.parseInt(str[0]);
int m = Integer.parseInt(str[1]);
int result = (h*60+m)+add;
System.out.println((result/60)%24 + " " + result%60);
}
}
'백준 문제풀기 > 조건문' 카테고리의 다른 글
[Java] 백준 2480 주사위 세개 (0) | 2022.11.14 |
---|---|
[Java] 백준 2884 알람 시계 (0) | 2022.11.14 |
[Java] 백준 14681 사분면 고르기 (0) | 2022.11.14 |
[Java] 백준 2753 윤년 (0) | 2022.11.14 |