题解 | #高精度整数加法#
高精度整数加法
https://www.nowcoder.com/practice/49e772ab08994a96980f9618892e55b6
import java.util.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
Scanner fzhinput = new Scanner(System.in);
String zfc1 = fzhinput.nextLine();
String zfc2 = fzhinput.nextLine();
BigInteger sz1= new BigInteger(zfc1);
BigInteger sz2= new BigInteger(zfc2);
System.out.println(sz1.add(sz2));
}
}

查看9道真题和解析