51 Nod 1028 大数乘法 V2【Java大数乱搞】

1028 大数乘法 V2

基准时间限制:2 秒 空间限制:131072 KB 分值: 80 难度:5级算法题
给出2个大整数A,B,计算A*B的结果。
Input
1行:大数A
2行:大数B
(A,B的长度 <= 100000A,>= 0
Output
输出* B
Input示例
123456
234567
Output示例
28958703552
 
AC代码:
 
import java.math.BigInteger;
import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
            BigInteger a,b;
            a = in.nextBigInteger();
            b = in.nextBigInteger();
        System.out.println(a.multiply(b));
    }
}
原文地址:https://www.cnblogs.com/DWVictor/p/10507291.html