HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50584 - Total invoice amount

Guest
• Review clarifications (1)

Section problems

• 50353 - Cube of the Largest number
• 50336 - Buying Carpets
• 50295 - Weighted Average
• 50296 - Total Discount Rate
• 50289 - Monthly Allowance
• 50559 - Prime Factors of a Number
• 50568 - Body Mass Index Calculator
• 50579 - Pentagonal Numbers
• 50584 - Total invoice amount
• 50634 - Perfect numbers
• 50635 - Decomposition into terms
• 50652 - Prime Factorization
• 50653 - Long Divide
• 50662 - Prime numbers (2)
• 50684 - Sum of prime numbers fro...
• 50546 - Average Fuel Price
• 50247 - Missing numbers

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.
Prepared by Ibrahim Mesecan.

Total invoice amount

Shqip

Mr. Alban Shehu runs GSS "Gezer Shoe Store". He wants to prepare a program for his invoices to calculate the total price.

Input specification
There are at least 1 and at most 10000 lines of input ending with a negative number. There are two integer numbers in every line: unitPrice and n.
    where unitPrice is the unit price of the given shoe type and it's 1 ≤ price ≤ 100
    n is the number of shoe pairs for this type and 1 ≤ n ≤ 1000.
The entry ends with a negative number .

Output specification
You will calculate and give one number: the sum of the invoice

Sample Input:
3 5
2 6
-1

Sample Output:
27


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

www.contester.ru