https://www.acmicpc.net/problem/2525
60분 = 1시간이기 때문에 시간은 몫으로 분은 나머지로 구한다.
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();
int c = sc.nextInt();
sc.close();
int M = (m + c)%60;
int H = h + (m+c)/60;
if(H > 23) System.out.println(H - 24 + " " + M);
else System.out.println(H + " " + M);
}
}