#93. [백준_C언어] 1074 : Z \ 분할 정복
입력 코드 #include #include int N, r, c; int ans, s; main() { scanf("%d %d %d", &N, &r, &c); while (N) { int idx; s = pow(2, N) / 2; if (c = s && r = s) idx = 2; else if (c >= s && r >= s) idx = 3; c %= s; r %= s; ans += pow(s, 2)*idx; N--; } printf("%d\n", ans); } 코드 설명 #분할정복 #재귀 참고 jaemin8852.tistory.com/251 [백준 BOJ] 1074 Z 링크 h..