这道题其实主要用到的是高精度数的比较大小,比较方法就是先比较数字长度,如果一样就从高位到低位挨个比较数字大小,这道题n的大小只有20,所以冒泡排序稳稳哒!!
代码来喽:
#include <bits/stdc++.h>
using namespace std;
int Judge(string x, string y) {
if (x.size() > y.size()) return 1;//先比较长度
else if (x.size() < y.
这道题其实主要用到的是高精度数的比较大小,比较方法就是先比较数字长度,如果一样就从高位到低位挨个比较数字大小,这道题n的大小只有20,所以冒泡排序稳稳哒!!
代码来喽:
#include <bits/stdc++.h>
using namespace std;
int Judge(string x, string y) {
if (x.size() > y.size()) return 1;//先比较长度
else if (x.size() < y.