随笔分类 -  java 大整数

摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1042View Code 1 // 大整数的加减乘除 两个数必须都是 BigInteger 类 2 import java.util.*; 3 import java.math.*; 4 public class Main{ 5 6 public static void main(String args[]){ 7 8 Scanner cin = new Scanner(System.in) ; 9 10 11 12 ... 阅读全文
posted @ 2013-03-05 09:54 Szz 阅读(289) 评论(0) 推荐(0) 编辑
摘要:1 import java.io.*; 2 import java.util.*; 3 import java.math.BigInteger; 4 /* 5 构造器 6 BigInteger(String val) 7 将 BigInteger 的十进制字符串表示形式转换为 BigInteger 8 BigInteger(String val, int radix) 9 将指定基数的 BigInteger 的字符串表示形式转换为 BigInteger10 11 常用方法12 add,subtract,multiply,divide,intValue,... 阅读全文
posted @ 2013-03-03 19:56 Szz 阅读(311) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1002大整数加法 :View Code 1 import java.util.*; 2 import java.math.*; 3 public class Main{ 4 5 public static void main(String args[]){ 6 7 Scanner cin = new Scanner(System.in) ; 8 int T = cin.nextInt() ; 9 int cas = 0 ;10 ... 阅读全文
posted @ 2013-03-03 19:37 Szz 阅读(226) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示