题解 | #求平均年龄#

求平均年龄

https://www.nowcoder.com/practice/ca319fdb02714994850cc631d76f5547

#Python版代码
n = int(input())
print('%.2f' % (sum(eval(input()) for _ in range(n)) / n))
#或者
from statistics import mean
print('%.2f' % mean(eval(input()) for _ in range(int(input()))))

全部评论

相关推荐

今天 11:05
门头沟学院 运营
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务