#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n,i;
long long int x,y,mul[1000];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%ld%ld",&x,&y);
mul[i]=x*y;
}
for(i=0;i<n;i++)
printf("%ld\n",mul[i]);
return 0;
}
This is the code I have written for TMUL. Though it gives no compilation error, it gives wrong answer. I believe it's because the problem expects input to be of atmost 10000 digits and this code will not function in that scenario. So how do I store such large and is this the right approach to solve this problem, given the size of input? Or should I use Karatsuba algorithm? Thank you.