Pagini recente » Cod sursa (job #1415922) | Cod sursa (job #1198078) | Cod sursa (job #1047083) | Cod sursa (job #2970796) | Cod sursa (job #6323)
Cod sursa(job #6323)
var f1,f2:text; i,j,n,b,x,m,c:longint; z:array[1..5000] of byte;
begin
assign(f1,'patrate2.in');
reset(f1);
assign(f2,'patrate2.out');
rewrite(f2);
read(f1,n);
c:=1;
z[1]:=1;
if n>1 then begin
for i:=1 to n*n do begin
begin
m:=0;
for j:=1 to c do begin
z[j]:=z[j]*2;
inc(z[j],m);
m:=z[j] div 10;
z[j]:=z[j] mod 10;
end;
while m>0 do begin
inc(c);
z[c]:=m mod 10;
m:=m div 10;
end;
end;
end; end;
for i:=c downto 1 do write(f2,z[i]);
close(f1);
close(f2);
end.