Cod sursa(job #432024)

Utilizator ionutz32Ilie Ionut ionutz32 Data 1 aprilie 2010 18:54:58
Problema Submultimi Scor 100
Compilator fpc Status done
Runda Arhiva educationala Marime 0.3 kb
var n,i,j:word;
f,g:text;
begin
assign(f,'submultimi.in');
assign(g,'submultimi.out');
reset(f);rewrite(g);
read(f,n);
n:=(1 shl n)-1;
for i:=1 to n do
    begin
    for j:=0 to 15 do
        if i and (1 shl j)>0 then
           write(g,j+1,' ');
    writeln(g);
    end;
close(f);close(g);
end.