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()); + } + +} +```