蓝桥杯
package Test_2019; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); BigInteger b = new BigInteger("0"); while(in.hasNext()) { String s = new String(in.nextLine()); BigInteger c = new BigInteger(s); b=b.add(c); } System.out.println(b.toString()); in.close(); } }