BC33 统计成绩
思路:
step1:输入正整数和成绩;
分别算出:最大值、最小值、平均值;
格式化输出结果,打印;
代码如下:
n = int(input())
score = list(map(float,input().split()))
a = max(score)+0.00001
b = min(score)+0.00001
c = (sum(score)/n)+0.00001
print('{:.2f} {:.2f} {:.2f}'.format(a,b,c))
n = int(input())
score = list(map(float,input().split()))
a = max(score)+0.00001
b = min(score)+0.00001
c = (sum(score)/n)+0.00001
print('{:.2f} {:.2f} {:.2f}'.format(a,b,c))