HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50426 - Calculating Sales

Guest
• Review clarifications (2)

Section problems

• 50630 - Radio Station
• 50631 - Robots
• 50251 - Symmetric matrix
• 50244 - Chessboard Pattern
• 50428 - Three Times
• 50879 - Passed or Failed
• 50387 - Passengers in the Train
• 50438 - Pattern with stars
• 50426 - Calculating Sales
• 50425 - Calculating Weekly Pay
• 50456 - nth Digit of a Number
• 50463 - Drawing a Triangle
• 50452 - Multiplication Table
• 50385 - From m to n
• 50590 - Bronze medalists
• 50604 - Viruses
• 50605 - Behind Bars

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Erisa Terolli.

Calculating Sales

An online retailer sells five different products whose retail prices are shown in the following table:

Product NumberRetail Price
12.89
24.50
39.98
44.49
56.87

Problem
Write a program that calculates and displays the total retail values of all products sold.

Input specification
You will be given lines of numbers containing two integers. First one represent the Product number and the second one the quantity sold. The end of input is marked with -1. Dont take into consideration products with negative quantity.

Output specification
Show the total retail values as a floating point number which have 2 digit precision after the floating point.

 Sample Input I   
1 1
2 1
3 1
4 1
5 1
-1
 Sample Output I   
28.73


Для отправки решений необходимо выполнить вход.

www.contester.ru