#B2088. Calculate Total Book Purchase Cost
Calculate Total Book Purchase Cost
Calculate Total Book Purchase Cost
Given the following book price list:
- Book 1 (Introduction to Computing): \(28.9\) per book
- Book 2 (Data Structures and Algorithms): \(32.7\) per book
- Book 3 (Digital Logic): \(45.6\) per book
- Book 4 (C++ Programming Tutorial): \(78\) per book
- Book 5 (Artificial Intelligence): \(35\) per book
- Book 6 (Computer Architecture): \(86.2\) per book
- Book 7 (Compiler Principles): \(27.8\) per book
- Book 8 (Operating Systems): \(43\) per book
- Book 9 (Computer Networks): \(56\) per book
- Book 10 (JAVA Programming): \(65\) per book
You are given 10 non-negative integers representing the quantities purchased for each book (in the order listed above). Compute the total cost using the formula:
\[ \text{total} = \sum_{i=1}^{10} (\text{quantity}_i \times \text{price}_i) \]
inputFormat
The input consists of a single line containing 10 integers separated by spaces. The i-th integer denotes the quantity purchased for the i-th book.
outputFormat
Output a single number representing the total cost. The answer should be printed with one decimal place.
sample
1 1 1 1 1 1 1 1 1 1
498.2