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

24569번 - Fergusonball Ratings 다국어

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

문제

Fergusonball players are given a star rating based on the number of points that they score and the number of fouls that they commit. Specifically, they are awarded 5 stars for each point scored, and 3 stars are taken away for each foul committed. For every player, the number of points that they score is greater than the number of fouls that they commit.

Your job is to determine how many players on a team have a star rating greater than 40. You also need to determine if the team is considered a gold team which means that all the players have a star rating greater than 40.

입력

The first line of input consists of a positive integer N representing the total number of players on the team. This is followed by a pair of consecutive lines for each player. The first line in a pair is the number of points that the player scored. The second line in a pair is the number of fouls that the player committed. Both the number of points and the number of fouls, are non-negative integers.

출력

Output the number of players that have a star rating greater than 40, immediately followed by a plus sign if the team is considered a gold team.

제한

예제 입력 1

3
12
4
10
3
9
1

예제 출력 1

3+

The image shows the star rating for each player. For example, the star rating for the first player is 12×5−4×3 = 48. All three players have a rating greater than 40 so the team is considered a gold team.

예제 입력 2

2
8
0
12
1

예제 출력 2

1

The image shows the star rating for each player. Since only one of the two players has a rating greater than 40, this team is not considered a gold team.

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2022 > CCC 2022 Junior Division 2번

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

출처

대학교 대회

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

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