TV subscription
A group of N friends in want to buy TV subscriptions. We know that
6 people can share one TV subscription. Also, the cost of one TV subscription is X rupees. Determine the minimum total cost that the group of N friends will incur so that everyone in the group is able to use TV subscription.
Input:-3
1 100
12 250
16 135
Input Description: The first line contains A single integer T — The number of test cases. Then The test cases follow.
-The first and only line of each test case contains two integers N and X — The size of The group of friends and The cost of one subscription.
Output: 100
500
405
Output Description: For each test case, output The minimum total cost that The group will incur so that everyone in The group is able to use TV subscription.
Constraints: 1<=T<=1000
1<=N<=100
1<=X<=1000
Explanation: Test case 1: There is only one person in the group. Therefore he will have to buy 1 subscription. Therefore the total cost incurred is 100.
Test case 2: There are 12 people in the group. Therefore they will have to buy 2 subscriptions. Therefore the total cost incurred is 500.
Test case 3: There are 16 people in the group. Therefore they will have to buy 3 subscriptions. Therefore the total cost incurred is 405.