您的位置:首页 > 编程语言 > Python开发

Python HackerRank|Collections.namedtuple(from collections import namedtuple)

2017-03-06 19:59 731 查看
Dashboard 

 Python 

 Collections 

 Collections.namedtuple()

from collections import namedtuple

N = int(input())
Student = namedtuple('Student', input())

ans = 0
for _ in range(N):
ans += int(Student(*input().split()).MARKS)

print('{0:.2f}'.format(ans/N))
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐