Passing test cases but on submittion giving wrong answer

#include
using namespace std;

int main() {
int t;
long long int n,m;
cin>>t;
while(t–)
{ int sum=0;
long long int num=0,rem;
cin>>n>>m;
num=n*m;
while(num>0)
{ rem=num%10;
sum+=rem;
num=num/10;

}
int temp;
temp=sum%3;
cout<<temp<<endl;

}
return 0;
}

I think its a question from an ongoing challenge of ISCC.Big multiplication
The length of n and m in the given question is 100000 digits so the input has to be a string not long long int its out of that range.
I can’t give you any hint as it is an ongoing challenge

1 Like

Thanks a lot