function solution(N, number) {
const arr = new Array(8).fill().map(() =>new Array());
for(let i=0; i<8; i++){
arr[i].push(Number(N.toString().repeat(i+1)));
console.log(arr[i][0])
for(let j=0;j<i;j++){
for(let arg1 of arr[j]){
for(let arg2 of arr[i-j-1]){
arr[i].push(arg1+arg2);//사용 횟수 i+1번째 배열에 넣는다
arr[i].push(arg1-arg2);
arr[i].push(arg1*arg2);
arr[i].push(arg1/arg2);
}
}
}
if(arr[i].includes(number))return i+1
}
return -1;
}