The UCF Programming Team coaches schedule practices regularly in fall and spring (by the way, all UCF students are welcome to the practices). During summer, the majority of the team members are gone but the coaches know how to make sure the students don’t get “rusty”. The coaches usually give prize money and reward the team members based on how many problems they solve during summer. For example, let’s assume the coaches have 1000 in prize money and there are three strudents. Let's also assume the three students solve, respectively, 5, 8, and 7 problems, i.e., a total of 20 problems. So, thereward for one problem will be 50(1000/20) and the three team members will receive, respectively, 250, 400 and 350.
Given the total prize money and the number of problems each team member has solved, compute the reward for each student.
sb00lgs 3년 전 2
The UCF Programming Team coaches schedule practices regularly in fall and spring (by the way, all UCF students are welcome to the practices). During summer, the majority of the team members are gone but the coaches know how to make sure the students don’t get “rusty”. The coaches usually give prize money and reward the team members based on how many problems they solve during summer. For example, let’s assume the coaches have 1000 in prize money and there are three strudents. Let's also assume the three students solve, respectively, 5, 8, and 7 problems, i.e., a total of 20 problems. So, thereward for one problem will be 50(1000/20) and the three team members will receive, respectively, 250, 400 and 350.
Given the total prize money and the number of problems each team member has solved, compute the reward for each student.