I/O Map 5

0

0 votes
Hard
Problem

FILE LINK:-Question5 Executable Files

NOTE:- EXECUTABLE FILES ARE DESIGNED TO TAKE INFINITE INPUTS TO FACILITATE SMOOTH TESTING. SO, NUMBER OF TEST CASES IS NOT TO BE PROVIDED AS INPUT IN THEM. REST OF THE INPUT TO BE GIVEN IN EXECUTABLES IS SAME AS SPECIFIED IN THE INPUT FORMAT.

Instructions:

Download file from above specified link, extract it for executable files and open README.txt file for further instructions.

Input Format:

The first will will contain an integer denoting number of test cases. Thereafter,  next lines contain two space separated integers and b.

Output Format:

For each test case print corresponding answer on a new line.

Constraints:

< T < 100

< a, b < 106

Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?