码迷,mamicode.com
首页 > 其他好文 > 详细

1015. 高精度乘法

时间:2017-11-03 16:13:28      阅读:112      评论:0      收藏:0      [点我收藏+]

标签:www.   put   input   style   block   display   整数   form   splay   

Description

输入2个整数a和b,输出a*b。

Input Format

输入有两行,第一行a,第二行b。

0a,b21000

Output Format

输出只有一行,a*b。

Sample Input

44
3

Sample Output

132




import java.util.Scanner;
import java.math.BigInteger;

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));
    }
}

1015. 高精度乘法

标签:www.   put   input   style   block   display   整数   form   splay   

原文地址:http://www.cnblogs.com/bernieloveslife/p/7778425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!