From 8974a6876593743239eeb1f076e0ea5c93714f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=ED=98=84?= Date: Mon, 1 Jul 2024 11:34:14 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"2024-05-09=20=EC=9B=90=EC=88=AD?= =?UTF-8?q?=EC=9D=B4=20=EB=A7=A4=EB=8B=AC=EA=B8=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c2985870e0d0005b210594a2245b0ee0590ef73d. --- .../\355\212\270\353\246\254/7-suhyun113.py" | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 "suhyun113/\355\212\270\353\246\254/7-suhyun113.py" diff --git "a/suhyun113/\355\212\270\353\246\254/7-suhyun113.py" "b/suhyun113/\355\212\270\353\246\254/7-suhyun113.py" deleted file mode 100644 index f12a44f..0000000 --- "a/suhyun113/\355\212\270\353\246\254/7-suhyun113.py" +++ /dev/null @@ -1,27 +0,0 @@ -# 2716 : 원숭이 매달기 - -N = int(input()) # 테스트 케이스의 개수 -results = [] - -for _ in range(N): - s = input().strip() - len_s = len(s) - - depth = 0 - max_depth = 0 - - for i in range(len_s): - if (s[i] == '['): - depth += 1 - if (depth > max_depth): - max_depth = depth - elif (s[i] == ']'): - depth -= 1 - - result = 1 #나무 꼭대기 도달위해 최소 한 마리 원숭이 필요 - for _ in range(max_depth): - result *= 2 - results.append(result) - -for result in results: - print(result) \ No newline at end of file