import java.util.*;
import java.math.BigInteger;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
BigInteger n , sum = BigInteger.valueOf(0);
while(sc.hasNext()){
n = sc.nextBigInteger();
sum = sum.add(n);
}
System.out.println(sum);
}
}
import java.math.BigInteger;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
BigInteger n , sum = BigInteger.valueOf(0);
while(sc.hasNext()){
n = sc.nextBigInteger();
sum = sum.add(n);
}
System.out.println(sum);
}
}
No comments:
Post a Comment