Skip to content

Instantly share code, notes, and snippets.

@2minchul
Created March 21, 2019 04:26
Show Gist options
  • Save 2minchul/5f01f00cbe14ea626632c8ee19a60f09 to your computer and use it in GitHub Desktop.
Save 2minchul/5f01f00cbe14ea626632c8ee19a60f09 to your computer and use it in GitHub Desktop.
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