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 1370. Magician

WA#7
Posted by Friends 24 Oct 2008 18:18
THIS OUR PROGRAMM:
program magician;
{$APPTYPE CONSOLE}
uses
  SysUtils;
Var
    i,j,n,m,k,t:integer;
    a:array[1..10000] of integer;
begin
     readln(n,m);
     for i:=1 to n do
     readln(a[i]);
     if(m>n) then m:=m mod n;
          t:=0;
          i:=m;
               repeat
                    i:=i+1;
                    t:=t+1;
                    write(a[i]);
                    if i=n then i:=0;
               until t=10;
end.
Re: WA#7
Posted by markzy 27 May 2009 11:46
Maybe you should input(n=12,m=12)to check your error.