Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Sofdor Ali found interest in mathematics very early in his life. And now, he wants to spread this interest to every young mind. But the way some of the Bangladeshi schools asks students to memorize the multiplication table disappoints him. “Multiplication is just repeated addition”, Sofdor says to himself and grieves as many young students do not even know this simple fact.

So he decided to open an online website for students named “Magical Blackboard” where they will be shown simple and yet important mathematical logics and puzzles. One of his lessons includes a puzzle where you will be given a number **A**, and you have to add it **B** times to get the sum. For example, if **A = 2** and **B = 3**, then you need to add **A** **3** times and your answer should be **( 2 + 2 + 2 ) = 6**.

Sofdor Ali has already decided about all the possible values for A and B which he will give to his online students. He asked for your help to write a program, that calculates the correct answer for every pair of A and B that Sofdor provides to you.

The first line contains an integer **T ( 1 ≤ T ≤ 10 ^{5} )**, the number of test cases. The next

For **30** percent of the cases, both **A** and **B** will be less than or equal to **10 ^{4}**.

For every pair of **A** and **B**, produce the correct result that Sofder expects from his students, on a line by itself.

Input | Output |
---|---|

3 2 3 10 10 4 5 | 6 100 20 |

92% Solution Ratio

rayhan50001Earliest,

SIR.24Fastest, 0.0s

ratul_ahmedLightest, 2.0 MB

touhidurShortest, 65B

Login to submit