题解 | #整型数组合并#

整型数组合并

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

while True:
    try:
        a = input()
        b = map(int,input().split())
        c = input()
        d = map(int,input().split())
        e = []
        #找到不重复的元素,放入空数组
        for i in b:
            if i not in e:
                e.append(i)
        for i in d:
            if i not in e:
                e.append(i)
        #升序排列,无连接符        
        print(''.join(map(str,sorted(e)))) 
        
        
    except:
        break
全部评论
用map吧,不用查重复
点赞 回复 分享
发布于 2022-05-27 10:51

相关推荐

2025-12-15 14:25
云南大学 Java
lei22:入职可能会看学信网,最好别伪装,这个简历找实习肯定是够的,肯定会有收 28 届实习生的公司的,多投就行
点赞 评论 收藏
分享
程序员花海:实习和校招简历正确格式应该是教育背景+实习+项目经历+个人评价 其中项目经历注意要体现业务 实习经历里面的业务更是要自圆其说 简历模板尽可能保持干净整洁 不要太花哨的
点赞 评论 收藏
分享
评论
3
收藏
分享

创作者周榜

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