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 1506. Columns of Numbers

What is wrong? WA2
Posted by zzzlll 3 Mar 2007 21:18
i don't understand what is wrong with my program?



var
a:array[1..100] of integer;
u,c,s,k,i,n,m:integer;
stra:string;
begin
  read(n,m);
    for k:=1 to n do read(a[k]);
    k:=1;
    i:=1;
    repeat
      i:=i+1;
    repeat
      str(a[k],stra);
      s:=length(stra);
      c:=4-s;
      for u:=1 to c do write(' ');
      write(a[k]);
      k:=k+m;
    until k>n;
     k:=i;
     writeln;
    until i>m;
end.

Edited by author 03.03.2007 21:37
Re: What is wrong? WA2
Posted by vitar 23 Mar 2007 23:00
k (m) is a number of columns, not rows.