[BaekJoon] 1074번 Z
·
💯 CodingTest/BaekJoon
▶ 문제 더보기 https://www.acmicpc.net/problem/1074 ▶ 코드 N, r, c = map(int, input().split()) l = 2 ** N def recursiveZ (x, y, l, startIndex): global answer, r, c if l == 2: if (x,y) == (r,c): answer = startIndex elif (x,y+1) == (r,c): answer = startIndex + 1 elif (x+1,y) == (r,c): answer = startIndex + 2 elif (x+1,y+1) == (r,c): answer = startIndex + 3 elif l > 2 : dividedL = l // 2 if r < dividedL an..