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 1413. Mars Jumper

HELP NEEDED PLEASE !!!
Posted by Nurbek 21 Mar 2006 01:54
Please could you help me on test 2. I've problem in TL.
What's problem ???
get your code!
Posted by +FAMAS+ 23 Mar 2006 11:03
Re: get your code!
Posted by Nurbek 21 Apr 2006 03:09
var
l,code:integer; x,y:real; c:char;
procedure bas;
begin
if c='1' then begin  x:=x-sqrt(2)/2; y:=y-sqrt(2)/2; exit;end;
if c='2' then begin y:=y-1; exit; end;
if c='3' then begin x:=x+sqrt(2)/2; y:=y-sqrt(2)/2; exit; end;
if c='4' then begin x:=x-1; exit; end;
if c='6' then begin x:=x+1; exit; end;
if c='7' then begin x:=x-sqrt(2)/2; y:=y+sqrt(2)/2; exit; end;
if c='8' then begin y:=y+1; exit; end;
if c='9' then begin x:=x+sqrt(2)/2; y:=y+sqrt(2)/2; exit; end;
end;
begin
repeat
read(c);
bas;
until (c=#13)or(c='0');
write((x):0:10); write(' '); write((y):0:10);
end.