#PCBTAM0000029. Phiếu điểm hai môn (Two-Subject Score Card)
Phiếu điểm hai môn (Two-Subject Score Card)
Two-Subject Score Card
Version: Phuoc Hung OJ Extended
Problem Statement
A score card contains a student's full name and two subject scores and . The combined score is the weighted average, assigning weight to the first subject and to the second:
Display the name, first score, second score, and combined score on one line. Show exactly two digits after the decimal point for every score. Apply formatting only when printing; do not round intermediate values before computing .
Input
The first line contains full name , possibly including spaces and Vietnamese characters. The second contains real numbers and separated by whitespace, each with at most four fractional digits.
Output
Print one line in the format name | a | b | m, with exactly one space on each side of every |. Show exactly two digits after the decimal point for all three numeric fields.
Subtasks
- Subtask 1 (100 points): characters; .
Examples
Example 1
Input
Nguyen Van An
8 9
Output
Nguyen Van An | 8.00 | 9.00 | 8.60
Explanation. For and , ; show 8.60 alongside 8.00 and 9.00.
Example 2
Input
Lê Bình
10 10
Output
Lê Bình | 10.00 | 10.00 | 10.00
Explanation. For scores and , ; all three numeric fields show 10.00.
Example 3
Input
A
0 5
Output
A | 0.00 | 5.00 | 3.00
Explanation. For and , ; display 0.00, 5.00, and 3.00.