Product
Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu
Submit Status

Description

The problem is to multiply two integers X, Y. (0<=X,Y<10250)


Input

The input will consist of a set of pairs of lines. Each line in pair contains one multiplyer.

Output

For each input pair of lines the output line should consist one integer the product.

Sample Input

12
12
2
222222222222222222222222

Sample Output

144
444444444444444444444444

大数乘法 java大法好

 1 import java.math.BigInteger;
 2 import java.util.Scanner;
 3  class Main
 4 {
 5     public static void main(String[] args)
 6     {
 7         BigInteger[] a=new BigInteger[5];
 8         Scanner input = new Scanner(System.in);
 9         while(input.hasNext())
10         {a[1]= input.nextBigInteger();
11         a[2]= input.nextBigInteger();
12         System.out.println(a[1].multiply(a[2]));
13         }
14     }
15 }
View Code