#CCBCMCHIN0000041. Trung bình 3 (Average 3)
Trung bình 3 (Average 3)
Average 3
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
Four scores have weights . Compute . A student passes when , fails when , and takes a retake when . In the retake case, read , compute , and pass iff . Use the exact Portuguese output labels specified below.
Input
The first line contains four scores . If a retake is required, the next line contains the retake score .
Output
First print Media: X.X. If , print Aluno aprovado.; if , print Aluno reprovado.. For a retake, print Aluno em exame., then Nota do exame: X.X, then Aluno aprovado. or Aluno reprovado. according to the final average, and finally Media final: X.X. Every displayed number has exactly one decimal digit.
Subtasks
Subtask 1 (20 points): Scores are in [0,10] with one decimal digit and the initial average is >= 7; no retake score. Subtask 2 (30 points): Scores are in [0,10] with one decimal digit and the initial average is < 5; no retake score. Subtask 3 (50 points): Scores are in [0,10] with one decimal digit; a retake score in [0,10] follows only when 5 <= the initial average < 7.
Examples
Example 1
Input
5 5 5 5
5
Output
Media: 5.0
Aluno em exame.
Nota do exame: 5.0
Aluno aprovado.
Media final: 5.0
Explanation
The weighted mean is 5.0. The retake mark is 5.0, so the final mean is 5.0 and the student passes.
Example 2
Input
7 7 7 7
Output
Media: 7.0
Aluno aprovado.
Explanation
The initial mean is exactly 7.0, so the student passes without a retake.