Skip to content

Commit d52d1b8

Browse files
ing-eokingbugs-bot
authored andcommitted
๐Ÿœ Study: ์ฟผ๋“œ์••์ถ• ํ›„ ๊ฐœ์ˆ˜ ์„ธ๊ธฐ (#48)
1 parent 329d2b9 commit d52d1b8

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def solution(arr):
2+
N = len(arr)
3+
total = sum(sum(arr,[]))
4+
if total == 0: return [1, 0]
5+
if total == N * N: return [0, 1]
6+
return [sum(s) for s in zip(
7+
solution([i[:N//2] for i in arr[:N//2]]),
8+
solution([i[:N//2] for i in arr[N//2:]]),
9+
solution([i[N//2:] for i in arr[:N//2]]),
10+
solution([i[N//2:] for i in arr[N//2:]])
11+
)]

0 commit comments

Comments
ย (0)