From 3b4088e2f38b716a26ebf2c0af2206123581b723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=84=9D=7CMinseok=20Kim?= Date: Wed, 19 Jun 2024 15:05:25 +0900 Subject: [PATCH 1/2] =?UTF-8?q?30=EC=B0=A8=EC=8B=9C=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=EC=84=A0=EC=A0=95=20=EB=B0=8F=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\353\260\251\353\262\210\355\230\270.swift" | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 "alstjr7437/\352\265\254\355\230\204/\353\260\251\353\262\210\355\230\270.swift" diff --git "a/alstjr7437/\352\265\254\355\230\204/\353\260\251\353\262\210\355\230\270.swift" "b/alstjr7437/\352\265\254\355\230\204/\353\260\251\353\262\210\355\230\270.swift" new file mode 100644 index 00000000..35748162 --- /dev/null +++ "b/alstjr7437/\352\265\254\355\230\204/\353\260\251\353\262\210\355\230\270.swift" @@ -0,0 +1,16 @@ +let N : String = readLine()! +var result : [Character:Int] = [:] + +for i in N{ + let temp = (i == "9") ? "6" : i + if result[temp] == nil{ + result[temp] = 1 + } else { + result[temp]! += 1 + } +} +if result["6"] != nil{ + result["6"]! = (result["6"]! + 1) / 2 +} + +print(result.values.max() ?? 0) \ No newline at end of file From 4cc374cd30b6b63b5e56cb55a45e7828e91a36f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=84=9D=7CMinseok=20Kim?= Date: Wed, 19 Jun 2024 15:07:27 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EB=A6=AC=EB=93=9C=EB=AF=B8=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alstjr7437/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alstjr7437/README.md b/alstjr7437/README.md index 7a444049..332be466 100644 --- a/alstjr7437/README.md +++ b/alstjr7437/README.md @@ -28,4 +28,5 @@ | 24차시 | 2024.05.14 | BFS | 토마토 | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/187 | | 25차시 | 2024.05.18 | 덱 | AC | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/190 | | 26차시 | 2024.05.22 | 정렬 | H-Index | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/196 | -| 27차시 | 2024.05.26 | 우선순위 큐 | 이중 우선순위 큐 | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/198 | \ No newline at end of file +| 27차시 | 2024.05.26 | 우선순위 큐 | 이중 우선순위 큐 | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/198 | +| 30차시 | 2024.06.19 | 방 번호 | 구현 | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/211 | \ No newline at end of file