#P3954. [NOIP 2017 普及组] 成绩

[NOIP 2017 普及组] 成绩

Description

Niuniu recently studied an introductory C++ course. The total score for this course is calculated as:

$$\text{总成绩}=\text{作业成绩}\times 20\%+\text{小测成绩}×30\%+\text{期末考试成绩} \times 50\%$$

Niuniu wants to know the final score they can get in this course.

Input Format

Three non-negative integers A,B,CA, B, C, representing Niuniu’s homework score, quiz score, and final exam score, respectively. Adjacent numbers are separated by a single space. Each of the three scores is out of 100100 points.

Output Format

A single integer: Niuniu’s total score for the course, also out of 100100 points.

100 100 80 
90
60 90 80 
79

Hint

Sample 1 Explanation

Niuniu’s homework score is 100100 points, quiz score is 100100 points, and final exam score is 8080 points. The total score is $100 \times 20\%+100 \times 30\%+80 \times 50\%=20+30+40=90$.

Sample 2 Explanation

Niuniu’s homework score is 6060 points, quiz score is 9090 points, and final exam score is 8080 points. The total score is $60 \times 20\%+90 \times 30\%+80 \times 50\%=12+27+40=79$.

Constraints

  • For 30%30\% of the testdata, A=B=0A=B=0.
  • For another 30%30\% of the testdata, A=B=100A=B=100.
  • For 100%100\% of the testdata, 0A,B,C1000≤A,B,C≤100 and A,B,CA,B,C are all multiples of 1010.

Translated by ChatGPT 5