You have just been hired to be a judge in the Thought Challenge Olympics. Your task is to calculate an overall score for a competitor based on his performance in a series of events. For each event, you have given him a raw score. The overall score is the sum of the adjusted scores for each event.
To calculate the adjusted score for an event, divide the raw score by the conversion factor for that event, and round the result to the nearest integer (.5 rounds up). You are given int[]s rawScores and conversionFactors. Element i of rawScores is the raw score you have given for the i-th event, and element i of conversionFactors is the conversion factor for the i-th event. Return the competitor's overall score.
|