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

34382번 - Weather Nodes 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB117848271.930%

문제

As part of a research initiative, a series of weather sensors have been put up all around the Mines campus. The idea is to help the local meteorologists more accurately track weather patterns along the front range by reporting precise temperature values at many different locations on the Mines campus.

The day comes when all the devices have been hooked together in a network, and you are tasked with compiling all the data and sending it to the local meteorologists. However, just as you are about to submit the data, something jumps out at you: some of the reported temperature values are way outside of the expected range! Some of the weather sensors must have been set up incorrectly, and are reporting erroneous outliers in the data.

It's too late to fix the sensors now, so you'll have to filter the erroneous readings out of the data you already have. Each temperature reading given is a real number representing the temperature in degrees Celsius as read by one of the weather sensors. All of the readings are taken at the same time. You note that all the correct temperature values are always within 10ドル.0$ degrees of the average of all the values. Everything else must be an erroneous reading.

How many of the weather sensors have reported erroneous values?

입력

The first line of the input is an integer, 0ドル \leq N \leq 1,000円$ specifying the total number of weather sensors. The remaining $N$ lines each contain a single real number $-10,000円 \le f \le 10,000円$ with at most 5ドル$ digits after the decimal point, representing the reading from a single weather sensor.

You are guaranteed that all valid readings will be at most 9ドル.999$ away from the average and that all invalid readings will be at least 10ドル.001$ away from the average.

출력

Print a single integer representing how many weather sensors gave erroneous readings.

제한

예제 입력 1

5
-20.0
1.0
2.0
3.0
20.0

예제 출력 1

2

예제 입력 2

20
26.2
25.0
24.9
32.6
45.2
18.3
21.0
31.1
24.5
21.1
27.0
38.7
29.8
11.4
26.2
23.7
24.1
29.1
9.5
23.3

예제 출력 2

4

노트

출처

School > CS@Mines > CS@Mines HSPC 2022 > Beginner C번

  • 문제를 만든 사람: Ryan Mapes
(追記) (追記ここまで)

출처

대학교 대회

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

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