Skip to content

algocpp::math::fact

sakamotor edited this page Jul 17, 2023 · 1 revision

algocpp::math::fact

Description

Returns $N!$

Time

$O(N)$

Example

#include <iostream>
#include <algocpp/math.hpp>
using namespace std;

int main()
{
    // 6
    cout << algocpp::math::fact(3) << endl;
}
Clone this wiki locally