***ACM***大数***
hhjian6666
路漫漫其修远兮,吾将上下而求索。修远兮,求索兮。
展开
-
大数加法(考虑负数)
#include #include #include #include using namespace std;int const maxn = 100005;char A[maxn],B[maxn];int fa,fb;void add(char* a,char* b){ int c[maxn], la = strlen(a)-1, lb = st原创 2017-12-03 23:27:08 · 1029 阅读 · 0 评论 -
大数减法
#include #include #include using namespace std;string sub(string str1, string str2){ string str; int flag = 0; if(str1.length() { flag = 1; string原创 2017-12-03 23:27:53 · 239 阅读 · 0 评论 -
大数乘法
#include#includevoid reverseOrder(char* str, int p, int q){ char temp; while(p { temp = str[p]; str[p] = str[q]; str[q] = temp; p ++;原创 2017-12-03 23:29:07 · 207 阅读 · 0 评论