Battle Droid Price

No attempts yetTime limit1sMemory limit128 MB

Problem

Sanggeun is trying to repair a broken battle droid. The price of each part that makes up a battle droid is as follows.

PartPrice
Blaster rifle$350.34
Visual sensor$230.90
Auditory sensor$190.55
Arm$125.30
Leg$180.90

Given the number of each required part, write a program that computes the total cost of buying all of them.

Input

The first line contains the number of test cases. Each test case consists of five non-negative integers $A$, $B$, $C$, $D$, $E$.

  • $A$: the number of blaster rifles needed
  • $B$: the number of visual sensors needed
  • $C$: the number of auditory sensors needed
  • $D$: the number of arms needed
  • $E$: the number of legs needed

Output

For each test case, print the total cost of buying all the given parts, rounded to two decimal places, one per line. Prefix the amount with a dollar sign ($). The answer is always at most 100,000,000.