首页 > 代码库 > oj2818

oj2818

基础排列组合

链接

 1 #include<cstdio>
 2 #include<cstring>
 3 #include<algorithm>
 4 using namespace std;
 5 #pragma warning(disable:4996)
 6 int n;
 7 #define LL long long
 8 long long ans;
 9 long long jc(int n)
10 {
11     LL x = 1;
12     for (int i = 1; i <= n; i++)
13         x *= i;
14     return x;
15 }
16 int main()
17 {
18     while (~scanf("%d" , &n))
19     {
20         LL x = jc(n);
21         ans = x*x / n;
22         printf("%lld\n" , ans);
23     }
24     return 0;
25 }

 

oj2818