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 1327. Fuses

Wrong answer Test 1 Pascal
Posted by XackerGT 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.