Total Expenses

0

0 votes
Problem

While purchasing certain items, a discount of 10% is offered if the quantity purchased is more than 1000. If the quantity and price per item are input, write a program to calculate the total expenses.

Input

The first line contains an integer T, total number of test cases. Then follow T lines, each line contains integers quantity and price.

Output

Output the total expenses while purchasing items.

Constraints

1 ≤ T ≤ 1000 1 ≤ quantity,price ≤ 100000

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?