Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

用java为什么错???

Posted by JLK at 2006-02-08 14:48:00 on Problem 1503
import java.math.BigInteger;
import java.util.Scanner;
public class Main
{
    public static void main(String[] args) throws Exception
    {
        BigInteger result = new BigInteger("0");
        
        while(true)
        {
            Scanner cin=new Scanner(System.in);
            BigInteger a = cin.nextBigInteger();
            result = result.add(a);
            if(a.toString().equals("0"))
            {
                System.out.println(result);
                break;
            }
        }
    }
}


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator