[알고리즘] 백준 1074 Z
def solve(n, x, y): global result if n == 2: if x==X and y==Y: print(result) return result += 1 if x==X and y+1==Y: print(result) return result += 1 if x+1==X and y==Y: print(result) return result += 1 if x+1==X and y+1==Y: print(result) return result +=1 return solve(n/2, x, y) solve(n/2, x, y + n/2) solve(n/2, x + n/2, y) solve(n/2, x + n/2, y + n/2) result = 0 n, X, Y = map(int, input().split..