https://www.acmicpc.net/problem/1408
using System;
class Program
{
static void Main() {
string[] arr=Console.ReadLine().Split(':');
int a1=int.Parse(arr[0]);
int b1=int.Parse(arr[1]);
int c1=int.Parse(arr[2]);
string[] att=Console.ReadLine().Split(':');
int a2=int.Parse(att[0]);
int b2=int.Parse(att[1]);
int c2=int.Parse(att[2]);
int hour=a2-a1+23;
int min=b2-b1+59;
int sec=c2-c1+60;
if(sec>=60){
sec-=60;
min+=1;
}
if(min>=60){
min-=60;
hour+=1;
}
if(hour>=24){
hour-=24;
}
Console.Write("{0:D2}:{1:D2}:{2:D2}",hour,min,sec);
}
}