https://school.programmers.co.kr/learn/courses/30/lessons/17681
two2 = Integer.toBinaryString(arr1[i]);
class Solution {
public String[] solution(int n, int[] arr1, int[] arr2) {
String[] answer = new String[n];
String[] twoarr1= new String[n];
String[] twoarr2= new String[n];
for(int i =0; i< arr1.length; i++){
String two ="";
for(int j =0; j<n;j++){
two+="0";
}
String two2 ="";
two2 = Integer.toBinaryString(arr1[i]);
two = two+two2;
two = two.substring(two2.length()) ;
twoarr1[i]=two;
}
for(int i =0; i< arr2.length; i++){
String two ="";
for(int j =0; j<n;j++){
two+="0";
}
String two2 ="";
two2 = Integer.toBinaryString(arr2[i]);
two = two+two2;
two = two.substring(two2.length()) ;
twoarr2[i]=two;
}
for(int i =0; i<n;i++){
String two3 ="";
String a= twoarr1[i];
String b =twoarr2[i];
for(int j=0; j<n; j++){
if(a.charAt(j)=='1'|| b.charAt(j)=='1'){
two3 += "#";
}
else{
two3+=" ";
}
}
answer[i]=two3;
}
return answer;
}
}