Under construction

Still being built. Things may change

Gahee and the Electricity Bill 1

Time limit1sMemory limit512 MB

Summary
Given a power draw of a W and a usage time of m minutes per query, compute the bill at 105.6 won per kWh, truncated to an integer.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

WW (watt) is the rate at which power is produced or consumed per second. WhWh (watt-hour) is the amount of power produced or consumed over one hour. 1kW1kW is 1000 times 1W1W. Working at a rate of 1W1W for one hour does 1Wh1Wh of work, and working at 1kW1kW for one hour does 1kWh1kWh of work. The electricity bill is calculated as follows.

  • The rate is 105.6 won per kWhkWh.
  • Drop the decimal part of the charge for the power used.

The bill is calculated only from the power used, and other factors are ignored. There are QQ queries. Print the answer to each query.

Input

The first line contains the number of queries QQ.

Each of the next QQ lines contains aa and mm, separated by a space. Each line means the following.

Gahee uses a computer that consumes aWaW of power for a total of mm minutes this month. What is the electricity charge for the power the computer used?

Output

Print QQ lines, one answer for each query.

Constraints

  • 1≤Q≤2 5001 \le Q \le 2\,500
  • 100≤a≤1 000100 \le a \le 1\,000
  • 100≤m≤105100 \le m \le 10^{5}
  • The computer Gahee used consumes the same amount of power every time it runs.

Examples2

  1. Example 1

    Input
    1
    500 100
    
    Expected output
    88
    
  2. Example 2

    Input
    2
    1000 600
    500 240
    
    Expected output
    1056
    211