Created
March 21, 2019 04:26
-
-
Save 2minchul/5f01f00cbe14ea626632c8ee19a60f09 to your computer and use it in GitHub Desktop.
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
def decrypt(row, size): | |
mask = 1 << (size - 1) | |
while mask: | |
yield '#' if (row & mask) else ' ' | |
mask = mask >> 1 | |
def solution(n, arr1, arr2): | |
answer = [] | |
for row in (a|b for a, b in zip(arr1, arr2)): | |
answer.append(''.join(decrypt(row, n))) | |
return answer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment