-->
当前位置:首页 > 题库

PROGRAMMING:Above average height

Luz5年前 (2021-05-10)题库480
Every semester, primary and secondary school students should have a physical examination to measure their height, because height can reflect their growth. Now, the height of a class has been measured, please output those heights that exceed the average height. The input of the program is a line of data, separated by spaces, and each data is a positive integer. The program should output those input values that exceed the average number of positive integers. There is a space after each number. The order of output is the same as that of input.
###Input format:
Enter the height values of a class in one line, separated by spaces.
###Output format:
Output input values on a line that exceed the average of the inputs, separated by spaces.
###Input example:
Here is a set of inputs. For example:
```in
143 174 119 127 117 164 110 128
```
###Output example:
The corresponding output is given here. For example:
```out
143 174 164
```







answer:If there is no answer, please comment
```
l=input().split()
l1=[int(i) for i in l]
aver=sum(l1)/len(l1)
l2=[i for i in l1 if i>aver]
for i in l2:
print(i,end=' ')
```