Can I get Tests 8 and 9..
I get the rest, but it fails on these one.
btw, this is my code
I get the rest, but it fails on these one.
btw, this is my code
Var R,C : Integer;
S,S1 : String[100];
mR,mC : Integer;
A : Array[1..10,1..10] Of String[1];
Begin
ReadLn(S);
mR:=0;
For R:=1 To Length(S) Do
For C:=1 To Length(S) Do
Begin
If R*C = Length(S) Then
If (R > mR) And (R<=C) Then Begin mR:=R; mC:=C; End;
End;
For C:=1 To mC Do
For R:=1 To mR Do
Begin
A[R,C]:=S[1];
Delete(S,1,1);
End;
S1:='';
For R:=1 To mR Do
For C:=1 To mC Do S1:=S1 + A[R,C];
WriteLn(S1);
End.