版本比较
高精度的故事
正文
增加 10 行删除 10 行
1234525 行未改动31323334353637383939 行未改动79808182838485868734 行未改动12212312412512612712812913020 行未改动15115215315415515615715815937 行未改动19719819920020120220320420520620720820921043 行未改动2542552562572582592602612626 行未改动2692702712722732742752762773 行未改动28128228328428528628728828970 行未改动**(一)高精加**```cpp#include <bits/stdc++.h>using namespace std;int a[45000],b[45000],c[100000],len;25 行未改动cout<<jia(s1,s2);return 0;}```**(二)高精减**```cpp#include <bits/stdc++.h>using namespace std;int a[100000],b[100000],c[100000],len,size;39 行未改动cout<<jian(s1,s2);return 0;}```**(三)高精乘**```cpp#include <bits/stdc++.h>using namespace std;int a[10000],b[10000],c[100000],size;34 行未改动cout<<cheng(s1,s2);return 0;}```**(四)高精除单精(求整数部分)**```cpp#include <bits/stdc++.h>using namespace std;string s;20 行未改动for (int i = size;i<s.size();i++) cout<<c[i];return 0;}```**(五)求$2^n$**```cpp#include <bits/stdc++.h>using namespace std;int a[10000],b[10000],c[100000],size;37 行未改动else if (n==1) cout<<2;else{for (int i = 1;i<n;i++) s1=cheng(s1,s2);cout<<s1;}return 0;}```**(六)求$n^m$**```cpp#include <bits/stdc++.h>using namespace std;int a[100000],b[100000],c[100000],size;43 行未改动}return 0;}```**(七)快速幂**```cpp#include <bits/stdc++.h>using namespace std;const int N=1e4+100;6 行未改动while (y){if(y&1) ans=ans*x%mod;x*=x;y/=2;}return ans;}int main()3 行未改动cout<<quick_pow(y,x);return 0;}```**(八)阶乘之和**```cpp#include <bits/stdc++.h>using namespace std;int a[45000],b[45000],c[100000],len,size;70 行未改动1234525 行未改动31323334353637383939 行未改动79808182838485868734 行未改动12212312412512612712812913020 行未改动15115215315415515615715815937 行未改动19719819920020120220320420520620720820921043 行未改动2542552562572582592602612626 行未改动2692702712722732742752762773 行未改动28128228328428528628728828970 行未改动**(一)高精加**```cpp#include <bits/stdc++.h>using namespace std;int a[45000],b[45000],c[100000],len;25 行未改动cout<<jia(s1,s2);return 0;}```**(二)高精减**```cpp#include <bits/stdc++.h>using namespace std;int a[100000],b[100000],c[100000],len,size;39 行未改动cout<<jian(s1,s2);return 0;}```**(三)高精乘**```cpp#include <bits/stdc++.h>using namespace std;int a[10000],b[10000],c[100000],size;34 行未改动cout<<cheng(s1,s2);return 0;}```**(四)高精除单精(求整数部分)**```cpp#include <bits/stdc++.h>using namespace std;string s;20 行未改动for (int i = size;i<s.size();i++) cout<<c[i];return 0;}```**(五)求$2^n$**```cpp#include <bits/stdc++.h>using namespace std;int a[10000],b[10000],c[100000],size;37 行未改动else if (n==1) cout<<2;else{for (int i = 1;i<n;i++) s1=cheng(s1,s2);cout<<s1;}return 0;}```**(六)求$n^m$**```cpp#include <bits/stdc++.h>using namespace std;int a[100000],b[100000],c[100000],size;43 行未改动}return 0;}```**(七)快速幂**```cpp#include <bits/stdc++.h>using namespace std;const int N=1e4+100;6 行未改动while (y){if(y&1) ans=ans*x%mod;x*=x;y/=2;}return ans;}int main()3 行未改动cout<<quick_pow(y,x);return 0;}```**(八)阶乘之和**```cpp#include <bits/stdc++.h>using namespace std;int a[45000],b[45000],c[100000],len,size;70 行未改动