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

29684번 - Which Team Should Receive the Sponsor Prize? 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
8 초 (추가 시간 없음) 1024 MB33130227491.030%

문제

In ICQC (International Collegiate Quiz Contest), participating teams compete the speed of answering a difficult quiz. The winner is, of course, the team that gives the correct answer first. In addition to this, in the contest this year, a sponsor prize will be provided to the team with the time of giving the correct answer closest to 2023 seconds after the start of the contest.

Given the list of elapsed times from the start of the contest before giving the correct answer for all the participating teams, decide which team is to be provided the sponsor prize.

입력

The input consists of multiple datasets, each in the following format. The number of datasets does not exceed 50.

n

a1 a2an

The integer n is the number of participating teams within the range between 2 and 100, inclusive. The teams are numbered 1 through n. ak (k = 1, …, n) is a positive integer not exceeding 104. It represents the elapsed time in seconds before the correct answer was given by the team numbered k. You may assume that one unique team has the elapsed time before answering correctly closest to 2023 seconds.

The end of the input is indicated by a line consisting of a zero.

출력

For each dataset, output in a line the team number of the team to be provided the sponsor prize.

제한

예제 입력 1

2
123 4567
3
2024 2020 2023
5
2020 2020 2021 2024 2026
3
1599 2222 1599
8
2 2 3 3 4 4 5 1
4
7777 6666 8888 9999
0

예제 출력 1

1
3
4
2
7
2

힌트

출처

ICPC > Regionals > Asia Pacific > Japan > Japan Domestic Contest > 2023 Japan Domestic Contest A번

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

출처

대학교 대회

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

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