VM7WC '15 #5 Bronze - Melanioana

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type

A certain physics teacher is marking tests. She has a specific marking scheme: if the paper has a drawing of a tree on it (the official Massey Green logo), the section of TACK worth the most automatically gets perfect. On the contrary, those who do not support Massey Green automatically get 0 on the section worth the most.

Given the person's Massey Green Status, their marks in each section and the total available marks in each section, output the person's weighted average for that test. The first line contains their Massey Green status (trees! or no). The next 4 lines contain the person's score, the maximum score, and the weighting w (0 \le w \le 1) separated by a space.

Output the person's result as a percentage rounded to the nearest integer.

Sample Input

10 20 0.6
15 20 0.2
12 15 0.1
19 20 0.1

Sample Output



There are no comments at the moment.