Pagini recente » Cod sursa (job #845712) | Cod sursa (job #494059) | Cod sursa (job #3170963) | Cod sursa (job #1137051) | Cod sursa (job #160190)
Cod sursa(job #160190)
var n,i,p1,p3,p:longint;
f,g:text;
function alabmodc(a,b:longint):longint;
var aux:longint;
begin
if b=1 then alabmodc:=a
else if b and 1=1 then alabmodc:=(alabmodc(a,b-1)*a)
else begin
aux:=alabmodc(a,b div 2);
alabmodc:=(aux*aux);
end;
end;
begin
assign(f,'patrate2.in'); reset(f);
readln(f,n); close(f);
p1:=1; p:=1;
for i:=2 to n do
p1:=p1*i;
p3:=p1*alabmodc(2,n*n);
assign(g,'patrate2.out'); rewrite(g);
writeln(g,p3);
close(g);
end.