From d3c166ac2509c89789b5b26f943280d7928ab8d8 Mon Sep 17 00:00:00 2001 From: Jonghwan Lee <123362165+0224LJH@users.noreply.github.com> Date: Fri, 28 Nov 2025 13:39:44 +0900 Subject: [PATCH] =?UTF-8?q?[20251128]=20BOJ=20/=20G4=20/=20=EC=A4=91?= =?UTF-8?q?=EB=B3=B5=20=EC=A0=9C=EA=B1=B0=20/=20=EC=9D=B4=EC=A2=85?= =?UTF-8?q?=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1\353\263\265 \354\240\234\352\261\260.md" | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 "0224LJH/202511/28 BOJ \354\244\221\353\263\265 \354\240\234\352\261\260.md" diff --git "a/0224LJH/202511/28 BOJ \354\244\221\353\263\265 \354\240\234\352\261\260.md" "b/0224LJH/202511/28 BOJ \354\244\221\353\263\265 \354\240\234\352\261\260.md" new file mode 100644 index 00000000..7c838a54 --- /dev/null +++ "b/0224LJH/202511/28 BOJ \354\244\221\353\263\265 \354\240\234\352\261\260.md" @@ -0,0 +1,48 @@ +```java + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.StringTokenizer; + +public class Main { + + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static List list = new ArrayList<>(); + static StringBuilder sb = new StringBuilder(); + + public static void main(String[] args) throws IOException { + + init(); + process(); + print(); + + } + + private static void init() throws IOException{ + StringTokenizer st = new StringTokenizer(br.readLine()); + while(st.hasMoreTokens()) { + list.add(Integer.parseInt(st.nextToken())); + } + + } + + private static void process() throws IOException { + HashSet set = new HashSet<>(); + for (int n: list) { + if (set.contains(n)) continue; + sb.append(n).append(" "); + set.add(n); + } + } + + private static void print() { + System.out.println(sb.toString()); + } + +} +```