|
|
back to boardhelp!!!!! program t1506; var n,m,a,b,c,i,j,l:integer; k,o:real;s:string; h:array [1..100] of integer; q:array [1..10,1..10] of integer; p:array [1..10,1..10] of integer; begin readln(n,k); for i:=1 to n do read(h[i]); m:=trunc(sqrt(n)); if frac(sqrt(n))<>0 then inc(m); for i:=1 to m do for j:=1 to m do begin inc(b); p[i,j]:=h[b]; str(h[b],s); q[i,j]:=length(s); if q[i,j]>a then a:=q[i,j]; end; for i:=1 to m do for j:=1 to m do begin write(' '); for b:=1 to (a-q[j,i]) do write(' '); if j<>m then begin write(p[j,i]); inc(l); end else begin writeln(p[j,i]); inc(l); end; if l=n then halt; end; end. Edited by author 03.03.2010 10:22 |
|
|