#include<iostream> #include<cstdlib> #include<cstring> using namespace std; int main() { char str1[1000],str2[1000]; cin>>str1>>str2; int sum[1000]; memset(sum,0,sizeof(sum)); int len1 = strlen(str1),len2 = strlen(str2); for(int i = len1-1;i>=0;i--) for(int j = len2-1;j>=0;j--) sum[1000-(len1+len2-2-i-j)-1] += (str1[i]-‘0‘)*(str2[j]-‘0‘); for(int i = 1000-1;i>=0;i--) { if(sum[i]>9) sum[i-1] += sum[i]/10; sum[i] %= 10; } int i = 0; while(sum[i]==0) i++; for(;i<1000;i++) cout<<sum[i]; }