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

30791번 - gahui and sousenkyo 1 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB105481977577.968%

문제

Gahui is watching the annual character election. After the election, The top 16 characters receive enormous benefits for one year because they belong to the Tier 1 (ranked 1st - 16th) section. For that reason, fans vote passionately to get their favorite characters into the top 16. Remarkably, at least one Cinderella appears in every election, achieving an outstanding outcome.

The competition rate of election is defined as the number of characters that satisfy the conditions below:

  • The character does not belong to the Tier 1 section.
  • The difference in votes between the character and the 16th-ranked character is 1ドル,000円$ or less.

Find the competition rate of the election.

입력

Votes from the 16th-ranked character to the 20th-ranked character are given, separated by spaces.

출력

Print the answer to the question.

제한

  • There are equal to or more than 1ドル,000円$ votes difference between the ranked 16th and 20th character votes.
  • No two characters received the same number of votes.
  • 30ドル,000円 \lt \text{Number of votes from ranked }16\text{th character to ranked }20\text{th character} \le 45,000円$.

예제 입력 1

40060 40000 39800 38996 37737

예제 출력 1

2

예제 입력 2

43300 39800 38900 36500 33500

예제 출력 2

0

힌트

출처

Contest > BOJ User Contest > 가희와 함께 하는 코딩 테스트 > 가희와 함께 하는 6회 코딩 테스트 A번

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

출처

대학교 대회

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

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