题解 | #求平均年龄#

求平均年龄

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
门头沟学院 运营
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-09 11:30
找工作7个月,投了7000封,3段世界五百强实习,才有一个offer,牛油们肯定比我强吧
码农索隆:不对不对不对,实习经历这么厉害,简历也没少投,问题出在哪呢
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-08 13:15
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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