题目大意:给两个数n, m,求C(n, m)。用java直接写就好了。

 import java.io.*;
import java.util.*;
import java.math.*; class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
BigInteger[] fact = new BigInteger[110];
fact[0] = BigInteger.ONE;
for (int i = 1; i <= 100; i++)
fact[i] = fact[i-1].multiply(BigInteger.valueOf(i));
int n, m;
while (sc.hasNext())
{
n = sc.nextInt();
m = sc.nextInt();
if (n == 0 && m == 0) break;
BigInteger ans = fact[n].divide(fact[m]).divide(fact[n-m]);
System.out.println(n + " things taken " + m + " at a time is " + ans + " exactly.");
} }
}

最新文章

  1. ccpc_南阳 C The Battle of chibi dp + 树状数组
  2. 用spring的InitializingBean作初始化
  3. Neuroaesthetics神经美学
  4. Linux SO_KEEPALIVE属性,心跳
  5. make xxx Is a directory. Stop.
  6. Solr开发参考文档(转)
  7. nuc900 nand flash mtd 驱动
  8. PHPMailer发送邮件方法
  9. 关于appcompat_v7兼容包的详细说明
  10. 读Zepto源码之Ajax模块
  11. JPG .vs. PNG
  12. MyDAL - is null &amp;&amp; is not null 条件 使用
  13. use case 的缺陷
  14. IPTABLES使用总结(内网模拟银行网络)
  15. Visual Studio 2015 key 许可证,下载地址
  16. ssh Jetson tk1
  17. Mysql 64位解压版的安装
  18. rlwrap与历史命令
  19. Omnigraffle快捷键
  20. centos 搭建docker环境

热门文章

  1. WindowsAPI 之 CreatePipe、CreateProcess
  2. hdu_3549_Flow Problem(最大流)
  3. Ubuntu root 密码设置及远程登录
  4. 关于Tcpreplay
  5. APK自我保护方法
  6. 对于crontab定时任务不能自动执行的总结
  7. Python 之路:Python操作 RabbitMQ、Redis、Memcache、SQLAlchemy
  8. git archive
  9. CodeForces 609A USB Flash Drives
  10. CSS——宽高问题大汇总