数学 杨辉三角 多项式系数
#include <cstdio> int f[13] = {1};
void init()
{
for (int i = 1; i < 13; i++)
f[i] = f[i - 1] * i;
}
int main ()
{
init();
int n,k,a;
while (scanf ("%d%d", &n, &k) == 2)
{
a = f[n];
for (int i = 0; i < k; i++)
{
int m;
scanf ("%d", &m);
a /= f[m];
}
printf ("%d\n", a);
}
return 0;
}