package com.code;public class Test04_3 { public static int solution(int X, int[] A) { int size = A.length; int [] res = new int[X]; int resCount = 0; if(X>size){ return -1; } if(size==1 && X==1 && A[0]==1){ return 0; } if(size==1 && X==1 && A[0]>1){ return -1; } for(int i=0;i