题解 | #整型数组合并#

整型数组合并

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

n1 = input()    # 用来扛输入的,不会用到
nums1 = set(map(int, input().split()))    # 确保是整形,排序才有依据
n2 = input()
nums2 = set(map(int, input().split()))

res = sorted(nums1 | nums2)    # 并集排序
print(''.join(map(str, res)))

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务