python输入2个列表,列表元素为数字,要求使用map函数求对应位置元素的平方和。 样例输入:[1,2,3] [2,4,1,5] 样例输出:[5, 20, 10]

动态 未结 0 71
小小草
小小草 LV1 2023年9月23日 23:40 发表
lst1 = list(map(int, input().split())) lst2 = list(map(int, input().split())) result = list(map(lambda x, y: x**2 + y**2, lst1, lst2)) print(result)
收藏(0)  分享
相关标签: 智能问答
问题没解决?让AI助手帮你作答 AI助手
0个回复
  • 消灭零回复