function f = fact(n)
    f = prod(1:n);
end