ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1070. Local Time

What's wrong with my short cole? HHHHHEEEEELLLLLPPPPP!!
Posted by Ural_Happy New Year! 26 Mar 2003 15:59
program t1070;
var a1,b1,a2,b2,t:extended;
    total:longint;
begin
     read(a1,b1,a2,b2);
     if a1>b1 then b1:=b1+24
        else if b2-a2>11 then begin t:=b2; b2:=a2+24; a2:=t; end;
     if a2>b2 then b2:=b2+24
        else if b1-a1>5 then begin t:=b1; b1:=a1+24; a1:=t; end;
     total:=trunc(abs((b1-a1)-(b2-a2))/2);
     writeln(total);
     readln;
     readln;
end.
=======================================
What's the local time if there is not in one day?