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 1404. Easy to Hack!

What a problem with my code, help please..
Posted by Andrew Shirshov 12 Nov 2008 00:43
It`s my Pascal code:
type mass=array[1..101] of shortint;
var i,j,j1:integer; s:string[101]; m1:mass;
begin
read(s); j1:=length(s);
for i:=1 to j1 do
begin
m1[i]:=ord(s[i])-97;
end; j:=5;
for i:=1 to j1 do
begin
if m1[i]>=j-1 then begin m1[i]:=m1[i]-j; j:=m1[i]+j; end
else begin m1[i]:=m1[i]+26-j; j:=m1[i]-26+j end
end;
for i:=1 to j1 do write(chr(m1[i]+97)); end.

Give me some tests were my program will give wrong answer..