Java 大整数 模板

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


public class main {

	/**
	 * @param args
	 * @throws FileNotFoundException 
	 */
	
	 static boolean Filein_out = false;
	 static String inputfile = "A-large-practice.in";
	 static String outputfile = "std.out";
	 
	 static BigInteger tmp1,tmp2;
	 static BigInteger BI_1 = new BigInteger("1");
	 static BigInteger BI_2 = new BigInteger("2");
	 static BigInteger BI_3 = new BigInteger("3");
	 static BigInteger BI_4 = new BigInteger("4");
	 static BigInteger BI_5 = new BigInteger("5");
	 static BigInteger BI_6 = new BigInteger("6");
	 static BigInteger BI_7 = new BigInteger("7");
	
	public static void main(String[] args) throws FileNotFoundException {
		// TODO Auto-generated method stub
		Scanner cin;
		PrintStream out = null;
		//控制台输入
		if(Filein_out == false){
			cin = new Scanner(System.in);
		}else{		
			//文件输入输出
			BufferedInputStream in = new BufferedInputStream(new FileInputStream(inputfile));
			System.setIn(in);
			cin = new Scanner(System.in);
			out = new PrintStream(new FileOutputStream(outputfile));
			System.setOut(out);
		}
		
		int T = 0 ;
		T=cin.nextInt();
		for(int i=1;i<=T;++i){
			tmp1=cin.nextBigInteger();
			tmp2=cin.nextBigInteger();
			System.out.println("Case #"+i+": tmp1="+tmp1+"  tmp2="+tmp2+"");
			
		}
		
		
		if(Filein_out == true){
			out.close();
		}
	}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值