21 lines
496 B
Python
21 lines
496 B
Python
def solution(n, arr1, arr2):
|
|
ans = []
|
|
|
|
for a, b in zip(arr1, arr2) :
|
|
row = ""
|
|
num = a | b
|
|
|
|
while num != 0:
|
|
val = num % 2
|
|
row += "#" if val else " "
|
|
num //= 2
|
|
|
|
while len(row) < n :
|
|
row += " "
|
|
|
|
ans.append(row[::-1])
|
|
|
|
return ans
|
|
|
|
print(solution(6, [46, 33, 33 ,22, 31, 50], [27 ,56, 19, 14, 14, 10]))
|
|
["######", "### #", "## ##", " #### ", " #####", "### # "] |