#PCBBAY0000058. Điểm trung bình có trọng số (Weighted Average Grade)
Điểm trung bình có trọng số (Weighted Average Grade)
Weighted Average Grade
Version: Phuoc Hung OJ Extended
Problem Statement
Given three grades , and on a 10-point scale, with weights , and respectively, compute the weighted mean . Print exactly 2 decimal places.
Input
The only line contains three real grades , , , in that order.
Output
Print weighted mean with exactly 2 decimal places.
Subtasks
- Subtask 1 (100 points): .
Examples
Example 1
Input
8 7 9
Output
8.20
Explanation. Substituting 8, 7, 9 into 0.2 × a + 0.3 × b + 0.5 × c gives approximately 8.2. The required output formatting produces 8.20.
Example 2
Input
10 10 10
Output
10.00
Explanation. Substituting 10, 10, 10 into 0.2 × a + 0.3 × b + 0.5 × c gives approximately 10. The required output formatting produces 10.00.
Example 3
Input
5.5 6.5 7.5
Output
6.80
Explanation. Substituting 5.5, 6.5, 7.5 into 0.2 × a + 0.3 × b + 0.5 × c gives approximately 6.8. The required output formatting produces 6.80.