N!

N!

N! | SDUT

#include <stdio.h>

long long int judgmenta(long long int n){//定义函数的类型,就是返回的类型
	long long int a=1;
	for(int i=1;i<=n;i++){
		a*=i;//累乘
	}
	return a;
}

int main(){
	long long int n,m;
	while(scanf("%lld %lld",&n,&m)!=EOF){
		long long int result,sum;
		result=judgmenta(n)/judgmenta(n-m);
		sum=result/judgmenta(m);
		printf("%lld %lld\n",result,sum);
	}
	return 0;
}
posted @ 2023-07-18 16:12  EricFirst001  阅读(15)  评论(0)    收藏  举报