Dangal with Shiva!
Practice
3 (2 votes)
Mathematics
Easy
Easy
Problem
6% Success 1553 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
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
Submissions
Please login to view your submissions
Similar Problems
Points:20
6 votes
Tags:
MathematicsOpenApprovedEasy
Points:20
Tags:
Easy
Points:20
7 votes
Tags:
MathematicsProbability and StatisticsEasy
Editorial
No editorial available for this problem.