|
|
вернуться в форумcound any one help?I think my program is right,but it got WA. program Acm_1070; var t1,t2:real; a,b,c,d:longint; i,te:longint; t:array[1..2] of longint; begin for i:=1 to 2 do begin readln(t1,t2); t1:=t1*100; t2:=t2*100; a:=round(t1); b:=round(t2); c:=a mod 100; d:=b mod 100; a:=a div 100; b:=b div 100; t[i]:=(b*60+d)-(a*60+c); if t[i]<=0 then t[i]:=t[i]+1440 end; te:=abs(t[1]-t[2]); for i:=-10 to 10 do if abs(te+i) mod 120=0 then begin writeln(abs(te+i) div 120); halt end end. |
|
|