From 64dc5b5a58b7bb10d16675cff564bb6d7629c6a2 Mon Sep 17 00:00:00 2001 From: JangHongJoon Date: Mon, 8 Apr 2024 00:15:20 +0900 Subject: [PATCH] 2024.04.08 solved --- wkdghdwns199/ACM-25192.py | 19 +++++++++++++++++++ wkdghdwns199/README.md | 1 + 2 files changed, 20 insertions(+) create mode 100644 wkdghdwns199/ACM-25192.py diff --git a/wkdghdwns199/ACM-25192.py b/wkdghdwns199/ACM-25192.py new file mode 100644 index 0000000..22d787c --- /dev/null +++ b/wkdghdwns199/ACM-25192.py @@ -0,0 +1,19 @@ +import sys +input = sys.stdin.readline +N = int(input()) +emoji_using_users = set() +time_for_emoji_use = False +emoji_use_count = 0 +for _ in range(N): + chat_string = input().rstrip() + if chat_string == 'ENTER' : + if time_for_emoji_use : + emoji_use_count += len(emoji_using_users) + else : + time_for_emoji_use = True + emoji_using_users = set() + else : + emoji_using_users.add(chat_string) + +emoji_use_count+=len(emoji_using_users) +print(emoji_use_count) \ No newline at end of file diff --git a/wkdghdwns199/README.md b/wkdghdwns199/README.md index 10a813b..c033c6d 100644 --- a/wkdghdwns199/README.md +++ b/wkdghdwns199/README.md @@ -18,4 +18,5 @@ | 14차시 | 2024.03.13 | 집합과 맵 | 영단어 암기는 괴로워 | 2024.03.13 | | 15차시 | 2024.03.20 | 우선순위 큐 | 절댓값 힙 | 2024.03.20 | | 16차시 | 2024.03.23 | 조합론 | 이항 계수 1 | 2024.03.23 | +| 19차시 | 2024.04.07 | 조합론 | 인사성 밝은 곰곰이 | 2024.04.07 |