From bd93bea267a02819f70ec438c3f4834c4b877806 Mon Sep 17 00:00:00 2001 From: suyeun84 <81475092+suyeun84@users.noreply.github.com> Date: Sat, 16 Aug 2025 22:12:09 +0900 Subject: [PATCH] =?UTF-8?q?[20250816]=20BOJ=20/=20G5=20/=20=EB=B3=84=20?= =?UTF-8?q?=EC=B0=8D=EA=B8=B0=20-=2010=20/=20=EA=B9=80=EC=88=98=EC=97=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\263\204 \354\260\215\352\270\260 - 10.md" | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 "suyeun84/202508/16 BOJ G5 \353\263\204 \354\260\215\352\270\260 - 10.md" diff --git "a/suyeun84/202508/16 BOJ G5 \353\263\204 \354\260\215\352\270\260 - 10.md" "b/suyeun84/202508/16 BOJ G5 \353\263\204 \354\260\215\352\270\260 - 10.md" new file mode 100644 index 00000000..9b7ba196 --- /dev/null +++ "b/suyeun84/202508/16 BOJ G5 \353\263\204 \354\260\215\352\270\260 - 10.md" @@ -0,0 +1,34 @@ +```java +import java.io.*; +import java.util.*; + +public class boj2447 { + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static StringTokenizer st; + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + static StringBuilder sb = new StringBuilder(); + + public static void main(String[] args) throws Exception { + nextLine(); + int N = nextInt(); + for (int i = 0; i < N; i++) { + for (int j = 0; j < N; j++) { + star(i, j, N); + } + sb.append('\n'); + } + System.out.println(sb); + } + + static void star(int i, int j, int n){ + if((i / n) % 3 == 1 && (j / n) % 3 == 1){ + sb.append(' '); + } + else{ + if(n == 1) sb.append('*'); + else star(i, j, n / 3); + } + } +} +```