Created
October 16, 2018 15:30
-
-
Save junho85/32b70ae775da3feaf3a49f37ea9e4b72 to your computer and use it in GitHub Desktop.
비밀지도 javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function solution(n, arr1, arr2) { | |
var answer = []; | |
for (var i=0; i<n; i++) { | |
var result_arr = arr1[i] | arr2[i]; | |
answer.push(result_arr.toString(2).padStart(n, '0').replace(/1/g, '#').replace(/0/g, ' ')); | |
} | |
return answer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment