/*这段是坑B(错误示范)的代码*/
#include <stdio.h>
//#include <stdlib.h>
#include <string.h>
//#include <malloc.h>
#define Val(a) (a - '0')
char A[1002];
char B[1002];
char C[2004];
char T[2004];
void Reverse(char *str){
char temp[1001];
int i,len = strlen(str);
for(i = len - 1; i >= 0; i--){
temp[len - i - 1] = str[i];
}
for(i = 0; i < len; i++){
str[i] = temp[i];
}
}
void trimz(char* a){
/*after reverse*/
int i,len = strlen(a);
for(i = len - 1; i >= 0; i--){
if(a[i] != '0')
return ;
else
a[i] = '\0';
}
}
void pre_p(char* a, char* b){
Reverse(a);
Reverse(b);
int len_a = strlen(a),len_b = strlen(b);
int i,Len = len_a > len_b ? len_a : len_b;
if(len_a > len_b){
for(i = len_b; i < len_a; i++){
b[i] = '0';
}
b[i] = '\0';
}
else{
for(i = len_a; i &
[OJ算法之路] 大整数乘法 & FFT
最新推荐文章于 2023-04-05 16:06:55 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)