Introduction - If you have any usage issues, please Google them yourself
The results of undergraduate students were given an average score system (GPA). Not only will the actual test scores of students according to different credit different subjects according to a certain formula.
The formula is as follows:
Actual achievement point
90 - 1004
85 - 893.7
82 - 843.3
78 - 813
75 - 772.7
72 - 742.3
68 - 712
64 - 671.5
60 - 631
60 below 0
The score of the 1. one course = the score of the course * the credits
2. overall grade point = all subjects GPA and / all the courses and credits
You are requested to write program to calculate the overall GPa. A (GPA).
Input data
Multiple sets of data for each group of data: the total number of first lines n (n<10);
The second lines of the corresponding course credits (two credits are separated by space);
The actual score of the third line corresponding course;