There are
bikes and cars on the road.
- Each bike has tyres.
- Each car has tyres.
Find the total number of tyres on the road.
Input Format
- The first line will contain - the number of test cases. Then the test cases follow.
- The first and only line of each test case contains two integers .
Output Format
For each test case, output in a single line, the total number of tyres on the road.
Constraints
Sample Input 1
2
2 1
3 0
Sample Output 1
8
6
Explanation
Test Case : There are bikes and car. Each bike has tyres, so there are bike tyres. Similarly, each car has tyres, so there are car tyres. Adding the tyres of all vehicles, we get tyres in total.
Test Case : There are bikes and cars. Each bike has tyres, so there are bike tyres. There are no cars, so there are car tyres. Adding the tyres of all vehicles, we get tyres in total.
No comments:
Post a Comment