UVa Problem 10105 Polynomial Coefficients (多项式系数)
来源:互联网 发布:车牌识别软件 编辑:程序博客网 时间:2024/04/30 02:48
// Polynomial Coefficients (多项式系数)// PC/UVa IDs: 110506/10105, Popularity: B, Success rate: high Level: 1// Verdict: Accepted// Submission Date: 2011-05-29// UVa Run Time: 0.024s//// 版权所有(C)2011,邱秋。metaphysis # yeah dot net//// 多项式定理的应用。多元多项式 (a + b + c + ... + f) ^ n 的通项式:// (n! / (k! * d! * j! * ... * z!)) * a^k * b^d * c^j * ... * f^z。#include <iostream>using namespace std;long long unsigned factorial(int m){if (m == 0)return 1;if (m == 1)return 1;return m * factorial(m - 1);}int main(int ac, char *av[]){int n, k, tmp;while (cin >> n >> k){long long unsigned numerator = factorial(n);long long unsigned denominator = 1;while (k--){cin >> tmp;denominator *= factorial(tmp);}cout << numerator / denominator << endl;}return 0;}
- UVa Problem 10105 Polynomial Coefficients (多项式系数)
- uva 10105 - Polynomial Coefficients(多项式系数)
- Polynomial Coefficients - UVa 10105 多项式系数
- uva10105 - Polynomial Coefficients(多项式系数)
- UVa:10105 Polynomial Coefficients(多项式定理)
- UVa Problem Solution: 10105 - Polynomial Coefficients
- uva 10105 polynomial coefficients
- UVA 10105 - Polynomial Coefficients
- UVA 10105 - Polynomial Coefficients
- UVA - 10105 Polynomial Coefficients
- UVA 10105 Polynomial Coefficients
- UVA - 10105 Polynomial Coefficients
- UVa 10105 - Polynomial Coefficients
- UVA 10105 Polynomial Coefficients(数论)
- UVa 10105 - Polynomial Coefficients (排列组合)
- UVa 10105 Polynomial Coefficients(组合数学)
- 10105 - Polynomial Coefficients
- UVA - 10105 Polynomial Coefficients 二项式定理和杨辉三角
- poj 2894 Ancient Keyboard
- UVa Problem 10018 Reverse and Add (反转相加)
- UVa Problem 701 The Archeologist’s Dilemma (考古学家的烦恼)
- UVa Problem 10127 Ones (仅由 1 组成的数)
- UVa Problem 847 A Multiplication Game (乘法游戏)
- UVa Problem 10105 Polynomial Coefficients (多项式系数)
- UVa Problem 10077 The Stern-Brocot Number System (Stern-Brocot 代数系统)
- UVa Problem 10202 Pairsumonious Numbers (两两之和)
- QT Creator环境升级出现的问题 ~exited with code -1073741511
- [记录]时间处理相关:返回某月的天数
- 推广性的界
- Android开发:什么是IBinder
- [记录] map插入后,key是无序的
- [问题记录]MyEclipse:PermGen space