高精度乘高精度
Description
读入两个高精度数(位数小于255),计算它们的积并输出结果
Input
两个高精度数
Output
这两个数的乘积
Sample Input
9834572345234234
5892348534
Sample Output
57948727940957880596512956
解题思路
用两个字符数组输入,将它们转到两个数组里,然后按各个位数相乘并处理进位就能得出结果。
#include<iostream>
#include<cstdio>
#include<iomanip>
#include<algorithm>
using namespace std;
const int maxn=3010;
char str1[1010],str2[1010];
int a[1010],b[1010],c[maxn];