Algoogle

Algorithm for Programming Contest

PKU 2389 Bull Math

Category: PKU Tag: big-integer, implementation

Bull Math

問題概要


解法


BigIntegerなのでJava

コード


(PKU2389.java) download
1
2
3
4
5
6
7
8
9
10
11
import java.math.BigInteger;
import java.util.Scanner;

public class POJ2389{
    void solve(){
        Scanner sc = new Scanner(System.in);
        String a = sc.next(), b = sc.next();
        BigInteger A = new BigInteger(a), B = new BigInteger(b);
        System.out.println(A.multiply(B));
    }
}

Comments