poj 1503 第一个java
import java.io.*;
import java.util.*;
import java.math.*;
public class Main
{
public static void main(String[] args)
{
String s;
BigInteger a,b,c;
Scanner sc=new Scanner(System.in);
Scanner cin=new Scanner(System.in);
b=BigInteger.valueOf(0);
while(cin.hasNext())
{
a=cin.nextBigInteger();
s=a.toString();
if(s.equals("0")) break;
b=b.add(a);
}
System.out.println(b);
}
}