10375专题

uva 10375 - Choose and divide(组合数)

题目连接:uva 10375 - Choose and divide 题目大意:给出p,q,s和r, 计算C(p, q) / C(s, r), 公式题目已经给出。 解题思路:以为C(p,q) = C(p,p - q), 所以要尽量选择计算量交少的,边乘边除。 #include <stdio.h>#define min(a,b) (a)<(b)?(a):(b)int m

Choose and divide UVA - 10375

Choose and divide   UVA - 10375  The binomial coefficient C(m, n) is defined as  C(m, n) = m! / (m − n)! n! Given four natural numbers p, q, r, and s, compute the the result of dividing C(p, q