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二级辅导-阶乘数列 (C语言代码)浏览:688 |
简单的a+b (C语言代码)浏览:626 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:840 |
三角形 (C++代码)记忆化搜索浏览:1220 |
星期判断机 (C语言代码)浏览:859 |
小九九 (C语言描述,不看要求真坑爹)浏览:984 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:604 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:728 |
很简单,,题解1041:C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:586 |
母牛的故事 (C语言代码)浏览:476 |