Time Arithmetic by smkt

main(a,b,c,d,e,f){while(~scanf("%d:%d:%d+%d:%d:%d",&a,&c,&e,&b,&d,&f))printf("%02d:%02d:%02d+%02d:%02d:%02d=",a,c,e,b,d,f),f+=e,f>59?f-=60,d++:0,d+=c,d>59?d-=60,b++:0,b+=a,b>23?b-=24:0,printf("%02d:%02d:%02d\n",b,d,f);}

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

download

return to the top page