Average scores
Time limit1sMemory limit1024 MB
Given each playthrough's player and points, print M, J, or V for whose average score is higher, or whether the averages are equal.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Mari and Jüri are playing a computer game and arguing about whose average score is higher. Write a program that decides, based on their results, whose average score is higher.
Input
The first line contains an integer (). Each of the following lines contains a capital letter M or J and an integer (), separated by a space. M stands for Mari, J for Jüri, and is the number of points that player scored in one playthrough.
Output
Print M if Mari's average score is higher, J if Jüri's average score is higher, or V if the two averages are equal. If a player has not played the game at all, that player's average score is .