题解 | #整型数组合并#
整型数组合并
http://www.nowcoder.com/practice/c4f11ea2c886429faf91decfaf6a310b
let num1 = null;
while(num1 = readline()) {
let num1_arr = readline()
let num2 = readline();
let num2_arr = readline();
num1_arr = num1_arr.split(' ').map(ele => parseInt(ele));
num2_arr = num2_arr.split(' ').map(ele => parseInt(ele));
let res = [];
//合并
res = res.concat(num1_arr, num2_arr);
//去重
let resSet = new Set(res);
res = Array.from(resSet);
//排序(升序)
res.sort((a, b) => a - b);
//输出
console.log(res.join(''));
}
while(num1 = readline()) {
let num1_arr = readline()
let num2 = readline();
let num2_arr = readline();
num1_arr = num1_arr.split(' ').map(ele => parseInt(ele));
num2_arr = num2_arr.split(' ').map(ele => parseInt(ele));
let res = [];
//合并
res = res.concat(num1_arr, num2_arr);
//去重
let resSet = new Set(res);
res = Array.from(resSet);
//排序(升序)
res.sort((a, b) => a - b);
//输出
console.log(res.join(''));
}