import java.util.Scanner;
public class Main{
public static void main(String args[]) {
int a[]=new int[3];
int[]b=new int[4];
String s,s0,a11 = null,b11 = null,c11 = null;
int a1,b1,c1,m,n,c;
Scanner sc =new Scanner(System.in);
s=sc.nextLine();
s0=sc.nextLine();
sc.close();
String[]s1=s.split(":");
String[]s2=s0.split(":");
for(int i=0;i<3;i++)
a[i]=Integer.parseInt(s1[i]);
for(int i=0;i<3;i++)
b[i]=Integer.parseInt(s2[i]);
m=3600*a[0]+60*a[1]+a[2];
n=3600*b[0]+60*b[1]+b[2];
if(m>n)
c=m-n;
else
c=n-m;
a1=c/3600;
b1=(c-3600*a1)/60;
c1=c-3600*a1-60*b1;
if(a1<10)
a11="0"+a1;
else a11=""+a1;
if(b1<10)
b11="0"+b1;
else
b11=""+b1;
if(c1<10)
c11="0"+c1;
else
c11=""+c1;
System.out.print(a11+":"+b11+":"+c11);
}
}
时间间隔
最新推荐文章于 2023-11-27 22:43:34 发布