Logo
(追記) (追記ここまで)

29965번 - Average scores 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB82027623632.373%

문제

Mari and Jüri are playing a computer game and arguing whose average score is higher. Write a program that based on their results decides whose average score is higher.

입력

The first line of input contains an integer $N$ (1ドル \le N \le 500,000円$). Each of the following $N$ lines contains a capital letter M or J and (separated by a space) an integer $P$ (0ドル \le P \le 10,000円$), where M stands for Mari and J for Jüri and $P$ is the number of points achieved during one playthrough by the corresponding player.

출력

The only line of output should consist of capital letter M if Mari's average score is higher than Jüri's, capital letter J if Jüri's average score is higher, or capital letter V if Mari's and Jüri's scores are equal. If a player has not played the game at all, then let that player's average score be 0ドル$.

제한

예제 입력 1

5
M 6000
J 7000
M 9545
M 4500
J 3200

예제 출력 1

M

힌트

출처

Olympiad > Estonian Informatics Olympiad > 2017-18 > Open Competition 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /