#include int factorial(int a){ int b=1; while (a>1){ b=b*a; a=a-1; } return b; } int P(int a,int b){ if (a