https://www.acmicpc.net/problem/2525
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// 시작시간
int h = scanner.nextInt();
int m = scanner.nextInt();
// 끝시간
int t = scanner.nextInt();
h += t / 60;
m += t % 60;
if(m >= 60) {
h += 1;
m -= 60;
}
if(h >= 24) {
h -= 24;
}
System.out.println(h + " " + m);
}
}코드를 입력하세요