https://www.acmicpc.net/problem/2530
import java.util.*
import java.lang.String.format
fun main(args: Array<String>) {
val sc=Scanner(System.`in`)
var h=sc.nextInt();
var m=sc.nextInt();
var s=sc.nextInt();
var n=sc.nextInt();
var sum=s+n;
m+=sum/60;
sum%=60;
h+=m/60;
m%=60;
h%=24;
print(format("%d %d %d",h,m,sum));
}