ENG
RUS
Timus 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
1327
. Fuses
XackerGT
Wrong answer Test 1 Pascal
// Problem
1327. Fuses
18 Nov 2011 18:56
program bif;
var a,b,c,d:integer; i:real;
begin
readln (a,b);
c:=((b-a)+1) mod 2;
if c=0 then i:=((b-a+1)/2) else
begin
i:=((b-a) div 2)+1;
d:=b mod 2;
if d=0 then i:=i-1;
end;
if a=b then i:=1;
writeln (i);
readln;
end.
© 2000–2026
Timus Online Judge Team
. All rights reserved.