Dangal with Shiva!
Tag(s):

## Easy, Easy, Mathematics

Problem
Editorial
Analytics

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

SAMPLE INPUT
1
3 3
SAMPLE OUTPUT
100
Explanation

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.

Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1, Visual Basic

## CODE EDITOR

Initializing Code Editor...

## This Problem was Asked in

Challenge Name

GeekWar

OTHER PROBLEMS OF THIS CHALLENGE
• Math > Game Theory