package com.company;
import java.util.Arrays;
class Solution {
static public void main(String[] args) {
System.out.println((Arrays.toString(solution(5, new int[]{9, 20, 28, 18, 11}, new int[]{30, 1, 21, 17, 28}))));
System.out.println((Arrays.toString(solution(6, new int[]{46, 33, 33 ,22, 31, 50}, new int[]{27 ,56, 19, 14, 14, 10}))));
}
static public String[] solution(int n, int[] arr1, int[] arr2) {
String[] answer = new String[n];
String[] totalArr1OrArr2 = new String[n];
for (int i = 0; i < n; i++) {
String mixMapArrElements = Integer.toBinaryString(arr1[i] | arr2[i]);
StringBuilder sb = new StringBuilder(mixMapArrElements);
for (int j = 0 ; j < (n - mixMapArrElements.length()); j++) {
sb.insert(0,"0");
}
totalArr1OrArr2[i] = sb.toString();
}
System.out.println(Arrays.deepToString(totalArr1OrArr2));
for (int i = 0; i < n; i++) {
answer[i] = totalArr1OrArr2[i].replace('0', ' ').replace('1', '#');
}
return answer;
}
}