53 25 34 43 68 0 Sample Output310101
#include<stdio.h>#include<algorithm>#include<iostream>using namespace std;double home(double n,double m){ double i,j,a=1.0,b=1.0; double sum = 1.0; j = m; while(j--) { a=n; b=m; sum=sum*a/b; n--; m--; } return sum;}int main(){ double n,m,t; cin >> t; while(t--) { cin >> n >> m; if(m>n) { cout << 0 << endl; continue; } printf("%.0lf/n",home(n,m)); } return 0;}
新闻热点
疑难解答