Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
用java为什么错???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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator