Pups
Time limit1sMemory limit1024 MB
Given dog counts, food per dog, and price per pound for several cases, the task is to print the total cost of food for each case.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
You adopted some puppies, and now you need to buy their food at the store. Your vet tells you how many pounds of food each puppy eats before your next trip to the store. Find the total amount of food you need to buy. You also know the price of the food per pound, so calculate how much money you must bring to pay for it.
Write a program that takes the number of puppies, the amount of food per puppy, and the price per pound, and calculates the money you need to bring.
Input
The first line contains a single integer , the number of lines that follow. Each of the next lines contains three non-negative numbers , , and : the number of dogs, the amount of food per dog in pounds, and the price of the food per pound.
Output
For each data set, output the total amount of money required to buy the food, rounded to the nearest hundredth. Put a dollar sign before the number.