10106

用java的大数类写的,果然方便

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.math.BigInteger;
import java.util.Scanner;


public class Main {


	public static void main(String[] args) throws FileNotFoundException {
		// TODO Auto-generated method stub
		//File file = new File("a.in");
		Scanner cin = new Scanner(new BufferedInputStream(System.in));
		BigInteger a, b;
		while(cin.hasNext()){
			a = cin.nextBigInteger();
			b = cin.nextBigInteger();
			System.out.println(a.multiply(b));
		}
	}

}

posted @ 2011-06-01 23:36  KOKO's  阅读(452)  评论(0编辑  收藏  举报