{$A+,B-,D+,E+,F-,G-,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+}
{$M 16384,0,655360}
program TEST;
uses crt;
const
KT=1000000; {kolichestvo mikro testov} 

var
l,t,t1: longint;
a: array[1..20] of integer;
b: array[1..20] of integer;
abi:byte;
i,j,y:integer;
label
n;
begin
clrscr;
{ �����⮢�  � �ᨢo� }
 randomize;
{  for abi:=1 to 20 do a[abi]:=random(100);}
 for abi:=1 to 20 do a[abi]:=20-abi;
 writeln('����㥬� � �ᨢ:');
 for abi:=1 to 20 do write(a[abi],'   ');
 writeln;
 for i:=1 to 20 do b[i]:=a[i];
{----------  FOR  ---------------------}
t1:= MemL[$0040:$006c];
for l:=1 to KT  do
begin
 for i:=20 downto 1 do for j:=1 to i-1 do If a[j]>a[j+1] then
 begin
  y:=a[j]; a[j]:=a[j+1]; a[j+1]:=y
 end;
 for i:=1 to 20 do a[i]:=b[i];
end;
t:=  MemL[$0040:$006c];
t:=t-t1;
writeln('for     ',t);

{--------  WHILE  ----------------------}
t1:= MemL[$0040:$006c];
l:=1;
while l<=KT do
begin
 for i:=20 downto 1 do for j:=1 to i-1 do If a[j]>a[j+1] then
 begin
  y:=a[j]; a[j]:=a[j+1]; a[j+1]:=y
 end;
 for i:=1 to 20 do a[i]:=b[i];
 inc(l)
end;
t:=  MemL[$0040:$006c];
t:=t-t1;
writeln('while   ',t);
{----------  repeat ---------------------}
t1:= MemL[$0040:$006c];
l:=1;
repeat
 for i:=20 downto 1 do for j:=1 to i-1 do If a[j]>a[j+1] then
 begin
  y:=a[j]; a[j]:=a[j+1]; a[j+1]:=y
 end;
 for i:=1 to 20 do a[i]:=b[i];
 inc(l)
until l=KT;
t:=  MemL[$0040:$006c];
t:=t-t1;
writeln('repeat  ',t);
{--------- If... then GOTO ... -----------}
  t1:= MemL[$0040:$006c];
L:=0;
N:
  inc(l);
 for i:=20 downto 1 do for j:=1 to i-1 do If a[j]>a[j+1] then
 begin
  y:=a[j]; a[j]:=a[j+1]; a[j+1]:=y
 end;
 for i:=1 to 20 do a[i]:=b[i];
 If l<=KT then GOTO n;

 t:=MemL[$0040:$006c];
 t:=t-t1;
writeln('GOTO    ',t);
 readkey;
end.