大数
PrConstantin
BLOG: http://constantin.cc
GITHUB: https://github.com/uselessaddress
展开
-
Java学习之ACM中使用大数类的基础方法及入门教程
ACM中的大数问题用Java的大数类敲方便快捷,而且极其容易上手!!! 本节针对java的大数类在ACM中的用法做简单的讲解。 如对Java中的一些基础用法不了解的去前一节看看~ http://blog.csdn.net/why850901938/article/details/51050735 资料均注明来源,侵删!1.简介: Java中两个类BigDecimal(原创 2016-04-03 16:45:46 · 1796 阅读 · 0 评论 -
Java 大数之大数高精度斐波那契 UVA_10579&&HDU1316 How many Fibs?
UVA_10579import java.math.BigInteger; import java.util.Scanner; public class UVA_10579 {//fibs[20] = 6765 ,fibs的上限达到上千位 public static void main(String[] args) { Scanner cin = new Scan原创 2016-04-03 17:06:52 · 482 阅读 · 0 评论 -
Java大数之大数比大小compareTo()和equals()的用法
import java.math.*;import java.util.*;public class Main { public static void main(String []args){ Scanner cin = new Scanner (System.in); BigInteger a,b,c,d; a=cin.nextBigI原创 2016-04-03 17:41:53 · 21707 阅读 · 0 评论 -
Java 大数之卡特兰数 HDU1130统计二叉树的数量
令h(0)=1,h(1)=1,catalan数满足递推式[1] : h(n)= h(0)*h(n-1)+h(1)*h(n-2) + … + h(n-1)h(0) (n>=2)例如:h(2)=h(0)*h(1)+h(1)*h(0)=1*1+1*1=2 h(3)=h(0)*h(2)+h(1)*h(1)+h(2)*h(0)=1*2+1*1+2*1=5递推关系的解为: h(n)=C(2n,n)/(n原创 2016-04-03 19:47:23 · 748 阅读 · 0 评论 -
Java大数简单题---Yet another A + B
PracticeGym 100735IDescription StatementsYou are given three numbers. Is there a way to replace variables A, B and C with these numbers so the equality A + B = C is correct?InputThere are three number原创 2016-04-06 21:18:08 · 852 阅读 · 0 评论