首页 > 代码库 > oj2817

oj2817

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
using namespace std;
#pragma warning(disable:4996)
#define LL long long
int n;
LL ans;
LL jc(int n)
{
    LL x = 1;
    for (int i = 1; i <= n; i++)
        x *= i;
    return x;
}
int main()
{
    while (~scanf("%d" , &n))
    {
        ans = jc(n) / 2;
        ans /= n;
        if (ans == 0)
            ans = 1;
        printf("%lld\n" , ans);
    }
    return 0;
}

排列组合

链接

oj2817