摘要: 这两个类都在java.math.*包中,因此每次必须在开头处引用该包。Ⅰ基本函数:1.valueOf(parament);将参数转换为制定的类型比如int a=3;BigInteger b=BigInteger.valueOf(a);则b=3;String s=”12345”;BigInteger c=BigInteger.valueOf(s);则c=12345;2.add();大整数相加BigInteger a=new BigInteger(“23”);BigInteger b=new BigInteger(“34”);a.add(b);3.subtract();相减4.multiply() 阅读全文
posted @ 2011-09-22 20:44 ○o尐懶錨o 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 模板:大素数判断 java2010-06-03 22:22import java.io.*;import java.util.*;import java.math.*;public class Main {static Scanner in;static PrintWriter out;public static void main(String[] args) throws Exception {in = new Scanner(System.in);out = new PrintWriter(System.out);int number;number = in.nextInt();int 阅读全文
posted @ 2011-09-22 20:17 ○o尐懶錨o 阅读(590) 评论(0) 推荐(0) 编辑