A. Easy Peasy

2.6

23 votes
Ad-Hoc, Very-Easy
Problem

While teaching you about Basic number operations, your teacher noticed you sleeping and gave you a task to calculate sum of inverse numbers ( too many of them...!! ) as a punishment. Being a lazy but smart student, you decided to make a program for it and let the program do your job. Now your task is to make a program which calculates sum of inverses of two numbers.

INPUT FORMAT :
First line of input will contain an integer N.
Following N lines will contain two integers A and B.

OUTPUT FORMAT :
Your output should contain N lines, each line containing the sum of inverses of the two numbers.

CONSTRAINTS :
1≤ N ≤104
1≤ A , B ≤105

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

In test case 1 : inverse of 12 is 21 and that of 21 is 12. 21+12 = 33

Editor Image

?