All submissions for this problem are available.
On the occassion of Mathematics day, Programming Club of our college is hosting a short programming contest based on the
theme of Mathematics. Our computer science faculty has given us a problem to solve.
He has given two very large numbers m and n.He asks all the students to find the remainder of product of two numbers m and n when divided by 3.
Help us to solve this problem.
The first line of the input contains an integer T denoting the number of test cases.
Each of the next T lines contains two space separated numbers m and n.
For each test case, Print remainder on a new line.
1<=T<=100 1<=length of m and n <=100000
2 2435 56789 124 234
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions