资源限制
时间限制:1.0s 内存限制:256.0MB
问题描述
输入两个正整数a,b,输出a+b的值。
输入格式
两行,第一行a,第二行b。a和b的长度均小于1000位。
输出格式
一行,a+b的值。
样例输入
4 2
样例输出
6
import java.math.BigInteger;
import java.util.*;
public class dashujiafa {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc =new Scanner(System.in);
BigInteger a = sc.nextBigInteger();
BigInteger b = sc.nextBigInteger();
BigInteger result = a.add(b);
System.out.println(result);
}
}