Liuzhenyuan @ 2023-07-17 19:06:40
#include<bits/stdc++.h>
using namespace std;
vector<int> mul(vector<int> A,vector<int> B)
{
vector<int> c;
int t=0;
for(int i=B.size()-1;i>=0;i--)
{
for(int j=0;j<A.size();j++)
{
t+=A[j]*B[i];
c.push_back(t%10);
t/=10;
}
}
return c;
}
int main()
{
string a,b;
cin>>a>>b;
vector<int> A,B;
for(int i=a.size()-1;i>=0;i--)
{
A.push_back(a[i]-48);
}
for(int i=b.size()-1;i>=0;i--)
{
B.push_back(b[i]-48);
}
vector<int> c=mul(A,B);
for(int i=c.size()-1;i>=0;i--)
{
cout<<c[i];
}
return 0;
}
by Adorable_ @ 2023-07-17 20:12:26
@ababbjxzt (擦汗)(纯路人)
vec学了一点,然后学的dp,只是学了一点皮毛罢()
by Adorable_ @ 2023-07-17 20:14:10
@ababbjxzt 贪心还没穴()只是怍过一点点题
by FengYuXinMing @ 2023-07-17 20:15:35
@Adorable_ 问题不大
by Adorable_ @ 2023-07-17 20:17:19
@ababbjxzt (膜拜dalao)
by Liuzhenyuan @ 2023-07-17 20:27:19
你们膜拜啥呀,我也才学vector啊
by Liuzhenyuan @ 2023-07-17 20:33:23
@ababbjxzt 别那么自卑
by FengYuXinMing @ 2023-07-18 09:00:57
@Liuzhenyuan 貌似不至于用自卑形容吧
by Liuzhenyuan @ 2023-07-18 09:31:56
额,怎么说,词穷了
by Liuzhenyuan @ 2023-07-18 10:30:07
此贴完结