1. 문제
https://programmers.co.kr/learn/courses/30/lessons/17681
2. 풀이
def solution(n, arr1, arr2):
answer = [''] * n
for i in range(n):
for j in range(n):
if bin(arr1[i])[2:].zfill(n)[j] == '1' or bin(arr2[i])[2:].zfill(n)[j] == '1':
answer[i] += ('#')
else:
answer[i] += (' ')
return answer
PREVIOUS[프로그래머스] 2016년 문제 풀이