Problem 10339 seems tricky to me. My idea to solve it was:

When a (real) day has passed, the k-watch has counted (86400-k) seconds. The same holds for the m-watch and (86400-m) seconds.

I calculate the number of (real) days, when the time difference between the two watches becomes 12 hours (43200 seconds) with

**d = 43200.0 / fabs(k-m)**

After "d" real days have passed, the k-watch has run

**kd = d * 86400.0/(86400.0-k)**

"k-days". The value

**mins = (int)floor(1440.0*fmod(kd,0.5)+0.5)**

should then give the minutes since midnight (or noon), when the watches meet. To determine the hour and minute to "mins" should be no problem.

I get WA - what did I do wrong?