×

# include <iostream>

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; }

11
accept rate: 0%

 1 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 answered 19 Jul '18, 18:07 66●4 accept rate: 0% Thanks a lot (20 Jul '18, 12:06)
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×858
×2

question asked: 19 Jul '18, 16:49

question was seen: 144 times

last updated: 20 Jul '18, 12:06