Time Arithmetic by nfouille

H,M,S,h,m,s;main(t){while(scanf("%d:%d:%d+%d:%d:%d",&H,&M,&S,&h,&m,&s)==6){\x0d
t=H+h;t*=60;t+=M+m;t*=60;t+=S+s;\x0d
printf("%02d:%02d:%02d+%02d:%02d:%02d=%02d:%02d:%02d\n",H,M,S,h,m,s,t/3600%24,t/60%60,t%60);}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page