From e8504f545ed41af725ff329d2b1cb219a1d69bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=ED=98=84?= Date: Sat, 30 Mar 2024 06:21:41 +0900 Subject: [PATCH 1/3] =?UTF-8?q?2023-03-29=20=EC=86=8C=EC=88=98=20&=20?= =?UTF-8?q?=ED=8C=B0=EB=A6=B0=EB=93=9C=EB=A1=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- suhyun113/2-suhyun113.py | 22 ++++++++++++++++++++++ suhyun113/README.md | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 suhyun113/2-suhyun113.py diff --git a/suhyun113/2-suhyun113.py b/suhyun113/2-suhyun113.py new file mode 100644 index 0000000..65e7990 --- /dev/null +++ b/suhyun113/2-suhyun113.py @@ -0,0 +1,22 @@ +# 팰린드롬 수 +def is_palindrome(num): + return str(num) == str(num)[::-1] + +# 소수 찾기 +def is_prime_num(n): + if n < 2: + return False # 1은 소수가 아님 + for i in range(2, int(n**0.5) + 1): + if n % i == 0: + return False + return True + +N = int(input()) # 어떤 수 N +# output은 N보다 크거나 같으므로 N으로 초기화 +result = N # 현재 + +while True: # N보다 크거나 같은 수(항상) + if is_prime_num(result) and is_palindrome(result): # 소수이면서 팰린드롬인 수 + print(result) + break + result += 1 \ No newline at end of file diff --git a/suhyun113/README.md b/suhyun113/README.md index a2c6ea2..b78920c 100644 --- a/suhyun113/README.md +++ b/suhyun113/README.md @@ -2,5 +2,5 @@ | 차시 | 날짜 | 문제유형 | 링크 | 풀이 | |:----:|:---------:|:----:|:-----:|:----:| -| 1차시 | 2024.02.12 | DP | [평범한 배낭](https://www.acmicpc.net/problem/12865) | [#1](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/5) | ---- +| 1차시 | 2024.03.25 | 그리디 | [체육복](https://school.programmers.co.kr/learn/courses/30/lessons/42862) | [#1](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/2) | +| 2차시 | 2024.03.29 | 수학 | [소수 & 팰린드롬](https://www.acmicpc.net/problem/1747) | [#1](https://github.com/AlgoLeadMe-10/AlgoLeadMe-10/pull/3) | \ No newline at end of file From f5d60551fb5cc191d3c7b2467fd11cd8941d780c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=ED=98=84?= Date: Sun, 31 Mar 2024 16:20:10 +0900 Subject: [PATCH 2/3] =?UTF-8?q?2024-03-29=20=EC=86=8C=EC=88=98=20&=20?= =?UTF-8?q?=ED=8C=B0=EB=A6=B0=EB=93=9C=EB=A1=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\354\210\230\355\225\231/2-suhyun113.py" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename suhyun113/2-suhyun113.py => "suhyun113/\354\210\230\355\225\231/2-suhyun113.py" (100%) diff --git a/suhyun113/2-suhyun113.py "b/suhyun113/\354\210\230\355\225\231/2-suhyun113.py" similarity index 100% rename from suhyun113/2-suhyun113.py rename to "suhyun113/\354\210\230\355\225\231/2-suhyun113.py" From 61dbdeac2c1824eb8ac576ee44481b6e4ef987ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=ED=98=84?= Date: Mon, 1 Apr 2024 20:49:10 +0900 Subject: [PATCH 3/3] Update README.md --- suhyun113/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suhyun113/README.md b/suhyun113/README.md index b78920c..658bbe3 100644 --- a/suhyun113/README.md +++ b/suhyun113/README.md @@ -3,4 +3,4 @@ | 차시 | 날짜 | 문제유형 | 링크 | 풀이 | |:----:|:---------:|:----:|:-----:|:----:| | 1차시 | 2024.03.25 | 그리디 | [체육복](https://school.programmers.co.kr/learn/courses/30/lessons/42862) | [#1](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/2) | -| 2차시 | 2024.03.29 | 수학 | [소수 & 팰린드롬](https://www.acmicpc.net/problem/1747) | [#1](https://github.com/AlgoLeadMe-10/AlgoLeadMe-10/pull/3) | \ No newline at end of file +| 2차시 | 2024.03.29 | 수학 | [소수 & 팰린드롬](https://www.acmicpc.net/problem/1747) | [#1](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/9) | \ No newline at end of file