From d6a492a6872e0e4f3f6de1f032ebe6ce9562e6a5 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Sun, 31 Aug 2025 18:35:18 +0900 Subject: [PATCH] 20250831 baekjoon --- code_study/Baekjoon/python/11478.py | 7 +++++++ code_study/Baekjoon/python/1269.py | 8 ++++++++ code_study/Baekjoon/python/14425.py | 15 +++++++++++++++ code_study/Baekjoon/python/7785.py | 14 ++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 code_study/Baekjoon/python/11478.py create mode 100644 code_study/Baekjoon/python/1269.py create mode 100644 code_study/Baekjoon/python/14425.py create mode 100644 code_study/Baekjoon/python/7785.py diff --git a/code_study/Baekjoon/python/11478.py b/code_study/Baekjoon/python/11478.py new file mode 100644 index 0000000..2c39eac --- /dev/null +++ b/code_study/Baekjoon/python/11478.py @@ -0,0 +1,7 @@ +s = input().rstrip() +substr = set() +for i in range(len(s)) : + for j in range(len(s)-i) : + substr.add(s[i:i+j+1]) + +print(len(substr)) \ No newline at end of file diff --git a/code_study/Baekjoon/python/1269.py b/code_study/Baekjoon/python/1269.py new file mode 100644 index 0000000..8a60755 --- /dev/null +++ b/code_study/Baekjoon/python/1269.py @@ -0,0 +1,8 @@ +import sys +input = sys.stdin.readline + +input() + +A = set(map(int,input().split())) +B = set(map(int,input().split())) +print(len(A-B) + len(B-A)) \ No newline at end of file diff --git a/code_study/Baekjoon/python/14425.py b/code_study/Baekjoon/python/14425.py new file mode 100644 index 0000000..1a589b6 --- /dev/null +++ b/code_study/Baekjoon/python/14425.py @@ -0,0 +1,15 @@ +import sys +input = sys.stdin.readline + +N, M = map(int, input().split()) +hashMap = dict() + +for _ in range(N) : + hashMap[input().rstrip()] = 1 + +count = 0 +for _ in range(M) : + if input().rstrip() in hashMap : + count += 1 + +print(count) \ No newline at end of file diff --git a/code_study/Baekjoon/python/7785.py b/code_study/Baekjoon/python/7785.py new file mode 100644 index 0000000..fd15f69 --- /dev/null +++ b/code_study/Baekjoon/python/7785.py @@ -0,0 +1,14 @@ +import sys +input = sys.stdin.readline + +log = dict() +for _ in range(int(input())) : + name, state = input().rstrip().split() + log[name] = state + +person = [] +for key in log : + if log[key] == "enter" : + person.append(key) + +print('\n'.join(sorted(person, reverse=True))) \ No newline at end of file