标签:使用 contains ini 返回值 content integer auth -o and
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 105601 Accepted Submission(s): 55782
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { BigInteger a,b,d; String c = "0"; d = new BigInteger(c); Scanner in = new Scanner(System.in); while(in.hasNextInt()) { b = d; int t = in.nextInt(); if(t == 0) break; for(int i=1;i<=t;i++) { a = in.nextBigInteger(); b = a.add(b);//注意使用add方法时有返回值!!! } System.out.println(b); } } }
java hdu A+B for Input-Output Practice (IV)
标签:使用 contains ini 返回值 content integer auth -o and
原文地址:http://www.cnblogs.com/l609929321/p/7043833.html