import java.util.Scanner; public class Main { static int c1; public static void main(String[] args) { Scanner sc=new Scanner(System.in); c1=sc.nextInt(); int c2=sc.nextInt(); int[]a=new int[c1+c2]; for (int i = 0; i < c1; i++) { a[i]=sc.nextInt(); } int[]b=new int[c2]; for (int i = 0; i < b.length; i++) { b[i]=sc.nextInt(); } int m=sc.nextInt(); int n=sc.nextInt(); Add(a, m, b, n); } static void Add(int a[], int m, int b[], int n){ int length=c1; if(m+n>length)length=m+n; for (int i = m; i < m+n; i++) { a[i]=b[i-m]; } for (int i =0; i <length; i++) { if(i==0)System.out.print(a[0]); else System.out.print(","+a[i]); } System.out.println(); } }
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题7.1 (C语言代码)浏览:516 |
printf基础练习2 (有点不明白)浏览:845 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:506 |
【蟠桃记】 (C语言代码)浏览:1034 |
1642题解浏览:715 |
妹子杀手的故事 (C语言代码)浏览:1054 |
数列问题 (C语言代码)浏览:1022 |
青年歌手大奖赛_评委会打分 (C语言代码)浏览:2150 |
C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:530 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:446 |