Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

PASCAL 1AC

Posted by aiouniya at 2012-08-28 16:27:00 on Problem 2039
var a:array[1..100,1..100]of char;
    i,j,l,n,o:integer;
    s:string;
begin
  readln(n);
  while n<>0 do begin
   readln(s);
   l:=length(s)div n;
   o:=1;
   for i:=1 to l do
     if odd(i) then
       for j:=1 to n do begin a[i,j]:=s[o]; inc(o); end
               else
       for j:=n downto 1 do begin a[i,j]:=s[o]; inc(o); end;
   for i:=1 to n do
     for j:=1 to l do
   write(a[j,i]);
   writeln;
  readln(n);
  end;
end.

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator