https://www.acmicpc.net/problem/2530
using System;
class Program
{
static void Main() {
string[] st=Console.ReadLine().Split(' ');
int h=int.Parse(st[0]);
int m=int.Parse(st[1]);
int s=int.Parse(st[2]);
string st1=Console.ReadLine();
int n=int.Parse(st1);
int sum=s+n;
m+=sum/60;
sum%=60;
h+=m/60;
m%=60;
h%=24;
Console.Write("{0} {1} {2}",h,m,sum);
}
}