class Solution {
public:
string multiply(string num1, string num2) {
int len1 =num1.size();
int len2 =num2.size();
long long carry=0;
long long n=1;
long long m=1;
long long sum=0;
long long temp=0;
for(int i=len1-1;i>=0;i--){
for(int j=len2-1;j>=0;j--){
long long a =num1[i]-'0';
long long b =num2[j]-'0';
temp = temp + a*b*n;
n=10*n;
}
sum=sum+temp*m;
m=10*m;
temp=0;
n=1;
}
stringstream ss;
ss<<sum;
return ss.str();;
}
};