From 2213f85482c166587205b049615113d93e6d377f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8F=84=ED=98=84=20KimDohyun?= <202230418@pukyong.ac.kr> Date: Wed, 15 May 2024 01:24:54 +0900 Subject: [PATCH] =?UTF-8?q?2024-05-14=20=ED=8C=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pu2rile/README.md | 7 +++++++ .../\355\214\224.py" | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 "pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\355\214\224.py" diff --git a/pu2rile/README.md b/pu2rile/README.md index f04c429..ba5ffd5 100644 --- a/pu2rile/README.md +++ b/pu2rile/README.md @@ -6,3 +6,10 @@ | 2차시 | 2024.03.29 | 구현 | [OX퀴즈](https://www.acmicpc.net/problem/8958) | [#6](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/6#issue-2214931034)| | 3차시 | 2024.04.02 | 문자열 | [크로아티아 알파벳](https://www.acmicpc.net/problem/8958) | [#10](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/10#issue-2220631332) | 4차시 | 2024.04.08 | 스택 | [제로](https://www.acmicpc.net/problem/10773) | [#15](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/15#issue-2229909173) +<<<<<<< Updated upstream +======= +| 5차시 | 2024.04.10 | 그리디 알고리즘 | [국회의원 선거](https://www.acmicpc.net/problem/1417) | [#18](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/18#issue-2235862658) +| 6차시 | 2024.05.10 | 그리디 알고리즘 | [ATM](https://www.acmicpc.net/problem/11399) | [#25](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/25#issue-2289086909) +| 7차시 | 2024.05.10 | 완전 탐색 알고리즘 | [영화감독 숌](https://www.acmicpc.net/problem/1436) | [#26](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/25#issue-2289086909) +| 8차시 | 2024.05.14 | 그리디 알고리즘 | [팔](https://www.acmicpc.net/problem/1105) | [#28]() +>>>>>>> Stashed changes diff --git "a/pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\355\214\224.py" "b/pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\355\214\224.py" new file mode 100644 index 0000000..dc6ddd8 --- /dev/null +++ "b/pu2rile/\352\267\270\353\246\254\353\224\224 \354\225\214\352\263\240\353\246\254\354\246\230/\355\214\224.py" @@ -0,0 +1,12 @@ +L, R = input().split() + +if len(L) != len(R): #각 숫자의 자릿수가 같아야 함, 서로 다르면 0 출력 + print(0) +else: + eight = 0 + for i in range(len(L)): + if L[i] == R[i] and L[i] == '8': #같은 자리의 숫자가 8이면 + eight += 1 #8의 개수 1 증가 + else: #8이 존재하는 자릿수가 다르면 계산하지 않음, 비교 중단 + break + print(eight) \ No newline at end of file