PivotOJ

Comfy Deviations

시간 제한: 1000ms메모리 제한: 512MB출처: ICPC Greater New York 2020BOJ 21301

문제

According to Wikipedia, standard deviation is a number used to tell how measurements for a group are spread out from the average (mean or expected value). A low standard deviation means that most of the numbers are close to the average, while a high standard deviation means that the numbers are more spread out. For this problem, you will read in 10 temperature values and use the standard deviation to determine if values are close to the mean temperature. The formula for calculating the standard deviation is:

st=i=1n(tit)2n1s_t = \sqrt{\frac{\sum_{i=1}^{n}{(t_i-\overline{t})^2}}{n-1}}

  • sts_t = Standard deviation of temperature values
  • nn = The number of data points (10 in this case)
  • tit_i = Each of the input temperature values
  • t\overline{t} = The average (mean) of all 10 input values.

입력

Input consists of a single line containing 10 space separated floating point values representing the temperature values to check.

Each temperature value, t1t10t_1 \dots t_{10} will be in the range (68t8068 \le t \le 80)

출력

The output consists of a single line that has the string COMFY if the standard deviation of the input values is ≤ 1.0 or NOT COMFY if the standard deviation of the input values is > 1.0.

예제

예제 1

입력
79 78 78 79 79 77 78 78 77 78
출력
COMFY

예제 2

입력
68.2 68 69.0004 68 69.8 70.123 72 73.10009 74 75.0
출력
NOT COMFY
코드를 제출하려면 로그인하세요.