标签:class group put next 输出 port color dem family
第1行:大数A
第2行:大数B
(A,B的长度 <= 10000 需注意:A B有可能为负数)
输出A + B
68932147586
468711654886
537643802472
Java在处理大数据方面很具有优势~~~~~~~~~~~~~~~~~~~
import java.math.BigInteger; import java.util.Scanner; public class Demo01 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); BigInteger integer = new BigInteger(scanner.nextLine().trim()); BigInteger integer2 = new BigInteger(scanner.nextLine().trim()); integer = integer.add(integer2); System.out.print(integer); } }
标签:class group put next 输出 port color dem family
原文地址:http://www.cnblogs.com/z-712/p/7291306.html