Shiva is planning to watch movie Dangal with his friends (total M people). They all decide and choose row D of PVR (row D has total N seats) but each one of them books his own ticket individually. Every pair of friends sitting together orders one pack of popcorn. Each pack costs Rs 50. Find the expected amount W that Shiva and his friends will spend on popcorn.
INPUT:
First line contains a single integer T denoting the number of test cases. T lines follow, each containing two integers N and M.
OUTPUT:
Output the greatest integer less than or equal to W for each test case in separate lines.
CONSTRAINTS:
T <=100
1<=M<=N<=1000000
1 3 3
100
There are 3 friends and 3 seats and thus only one way in which they can be seated and there are 2 pairs of friends sitting together and thus, buy 2 packs of popcorn.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
No editorial available for this problem.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor