当前位置 : 主页 > 编程语言 > java >

洛谷 P2142 高精度减法

来源:互联网 收集:自由互联 发布时间:2022-07-04
​​传送门​​ import java . math . BigInteger ; import java . util . * ; public class Main { public static void main ( String [] args ) { final int maxn = ( int ) ( 1e6 + 5 ); int [] x = new int [ maxn 1 ]; int [] y = new int [ maxn

​​传送门​​

import java.math.BigInteger;
import java.util.*;

public class Main {
public static void main(String[] args) {
final int maxn = (int) (1e6 + 5);
int[] x = new int[maxn << 1];
int[] y = new int[maxn << 1];
int[] vis = new int[maxn];
int[] book = new int[maxn];
Scanner cin = new Scanner(System.in);
Map map = new HashMap();
// String String2;
// String2 = cin.next();
// char []String1 = String2.toCharArray();//字符串拆分成数组
// System.out.println(change(n, m, number));
BigInteger a = cin.nextBigInteger();
BigInteger b = cin.nextBigInteger();
System.out.println(a.subtract(b));
}
}


网友评论