2020年蓝桥杯Python大学组H题答疑环节是哪一届?
- 内容介绍
- 文章标签
- 相关推荐
本文共计148个文字,预计阅读时间需要1分钟。
题目:蓝桥杯-国赛-Python大学组-H.答疑 Code Python if __name__=='__main__':链接:https://codepython.org/内容: Ideas 2020年第十一届蓝桥杯 + 国赛 + Python大学组 + H.答疑 Code Pythonif __name__=='__main__': n=int(input()) student_time_list=[] for _ in range(n): student_time_list.append(list(input()))
题目链接
Ideas
2020年第十一届蓝桥杯 - 国赛 - Python大学组 - H.答疑
Code
Python
if __name__ == '__main__':n = int(input())
student_time_list = []
for _ in range(n):
student_time_list.append(list(map(int, input().split())))
ans = 0
student_time_list.sort(key=lambda x: sum(x))
for i in range(n):
ans += (n - i) * sum(student_time_list[i])
ans -= student_time_list[i][-1]
print(ans)
本文共计148个文字,预计阅读时间需要1分钟。
题目:蓝桥杯-国赛-Python大学组-H.答疑 Code Python if __name__=='__main__':链接:https://codepython.org/内容: Ideas 2020年第十一届蓝桥杯 + 国赛 + Python大学组 + H.答疑 Code Pythonif __name__=='__main__': n=int(input()) student_time_list=[] for _ in range(n): student_time_list.append(list(input()))
题目链接
Ideas
2020年第十一届蓝桥杯 - 国赛 - Python大学组 - H.答疑
Code
Python
if __name__ == '__main__':n = int(input())
student_time_list = []
for _ in range(n):
student_time_list.append(list(map(int, input().split())))
ans = 0
student_time_list.sort(key=lambda x: sum(x))
for i in range(n):
ans += (n - i) * sum(student_time_list[i])
ans -= student_time_list[i][-1]
print(ans)

