题解@PoPoQQQ
反正我是懒得写高精度了,刚好刚学py 2333
1 /************************************************************** 2 Problem: 2729 3 User: rausen 4 Language: Python 5 Result: Accepted 6 Time:708 ms 7 Memory:8736 kb 8 ****************************************************************/ 9 10 n, m = [int(st) for st in raw_input().split()] 11 fac = [1] * 2010 12 for i in range(1, 2010) : fac[i] = fac[i - 1] * i 13 def c(n, m) : 14 if (n < m): return 0 15 return fac[n] / fac[n - m] 16 print c(n, n) * (c(n + 1, 2) * c(n + 3, m) + 2 * (n + 1) * c(n + 2, m - 1) * m)
By Xs酱~ 转载请说明
博客地址:http://www.cnblogs.com/rausen