https://school.programmers.co.kr/learn/courses/30/lessons/17681
class Solution {
public String[] solution(int n, int[] arr1, int[] arr2) {
String[] answer = new String[n];
for(int i = 0; i < n; i++){
answer[i] = Integer.toBinaryString(arr1[i] | arr2[i]); // '2์ง์' ๋ณํ
answer[i] = answer[i].replace("0", " "); // '0 -> ๊ณต๋ฐฑ' ๋ณํ
answer[i] = answer[i].replace("1", "#"); // '1 -> #'' ๋ณํ
while (answer[i].length() < n) {
answer[i] = " " + answer[i]; // ๊ธธ์ด ๋น๊ต ํ ๋ถ์กฑํ ๋๋ง๋ค ์์ ๊ณต๋ฐฑ์ ์ถ๊ฐ
}
}
return answer;
}
}