POJ 1503 Integer Inquiry 大数 难度:0

题目链接:http://poj.org/problem?id=1503

 

 1 import java.io.*;

 2 import java.math.BigInteger;

 3 import java.util.Scanner;

 4  

 5 public class Main {

 6     public static void main(String []args) throws IOException{

 7         Scanner scanner=new Scanner(System.in);

 8         BigInteger a=BigInteger.ZERO;

 9         BigInteger A=BigInteger.ZERO;

10         do{

11             a=scanner.nextBigInteger();

12             A=A.add(a);}

13         while(!a.equals(BigInteger.ZERO));

14         System.out.println(A);

15     }

16 }
View Code

 

你可能感兴趣的:(Integer)