Pagini recente » Cod sursa (job #764736) | Cod sursa (job #1595729) | Cod sursa (job #134602) | Cod sursa (job #3270145) | Cod sursa (job #6324)
Cod sursa(job #6324)
var f1,f2:text; i,j,n,b,x,m,c:longint; z:array[1..10000] 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.