xxzjh04170915 @ 2021-09-29 15:50:29
#include <bits/stdc++.h>
using namespace std;
int qian[50001];
int hou[50001];
int zhong[50001];
int main()
{
string a1;
string b2;
scanf("%s%s",&a1,&b2);
//string zhong;
int ch1=a1.length();
int ch2=b2.length();
int jinwei;
for( int i=ch1-1;i>=0;i--)
{
qian[ch1-i]=a1[i]-'0';
}
for( int i=ch2-1;i>=0;i--)
{
hou[ch2-i]=b2[i]-'0';
}
for( int i=1;i<=ch1;i++)
{
for( int j=1;j<=ch2;j++)
{
zhong[i*j]+=(qian[i]*hou[j]);
jinwei=zhong[i*j]/10;
zhong[i*j]%=10;
zhong[i*j+1]+=jinwei;
}
}
int ch3=ch1*ch2+2;
while(zhong[ch3]==0) ch3--;
for( int i=ch3;i>=1;i--)
{
cout<<zhong[i];
}
// return;
return 0;
}
by simple_dream @ 2021-09-29 16:09:40
@xxzjh04170915 scanf
不能读'string
by xxzjh04170915 @ 2021-09-29 16:59:32
@simple_dream 谢谢,我nt了