el primer codigo que te puse te calcula los r1!r2!...rn!. Estos deberan estar en un Memo (componente), por ejemplo.
Código Delphi
[-]
function Factorial(n : integer) : integer;
begin
result := 1;
if abs(n) > 2 then exit;
result := n*Factorial(n-1);
end;
function R1R2RN : longint;
var
i : integer;
begin
result := 1;
for i := 0 to Memo1.Lines.Count - 1 do
result := result*Factorial(strtoint(Memo1.Lines[i]));
end;
procedure Button1Click(sender : TObject);
begin
resultadofinal.Caption := strtofloat(Factorial(Edit1.Text) / R1R2RN);
end;