From 54abc2b2b6afad3c0cd8c6d3e44a0c02ed70fdd9 Mon Sep 17 00:00:00 2001 From: xeonxeonx Date: Mon, 16 Jan 2023 13:53:44 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EC=A7=9D=EC=A7=80=EC=96=B4=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=ED=95=98=EA=B8=B0=20=EB=AC=B8=EC=A0=9C=20=ED=92=80?= =?UTF-8?q?=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4\240\234\352\261\260\355\225\230\352\270\260.py" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" diff --git "a/programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" "b/programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" new file mode 100644 index 0000000..e845974 --- /dev/null +++ "b/programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" @@ -0,0 +1,12 @@ +def solution(s): + 리스트 = [] + + for i in s: + if len(리스트) == 0: + 리스트.append(i) + elif i == 리스트[-1]: + 리스트.pop() + else: + 리스트.append(i) + + return int(리스트 == []) \ No newline at end of file From aa9feca98d445b559e982344e4635341af4ce47e Mon Sep 17 00:00:00 2001 From: xeonxeonx Date: Mon, 16 Jan 2023 13:58:27 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EC=A7=9D=EC=A7=80=EC=96=B4=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=ED=95=98=EA=B8=B0=20=EB=AC=B8=EC=A0=9C=20=ED=92=80?= =?UTF-8?q?=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...26\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git "a/programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" "b/programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" index e845974..6eac0a6 100644 --- "a/programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" +++ "b/programmers/\354\247\235\354\247\200\354\226\264 \354\240\234\352\261\260\355\225\230\352\270\260.py" @@ -9,4 +9,5 @@ def solution(s): else: 리스트.append(i) - return int(리스트 == []) \ No newline at end of file + return int(리스트 == []) + \ No newline at end of file From 0c1d266987c1e95fad91ba1f869a2697225d8be8 Mon Sep 17 00:00:00 2001 From: xeonxeonx Date: Fri, 20 Jan 2023 21:09:23 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=EC=A7=9D=EC=88=98=EC=99=80=20=ED=99=80?= =?UTF-8?q?=EC=88=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes ...\230\354\231\200 \355\231\200\354\210\230.py" | 6 ++++++ ...0\234\352\261\260\355\225\230\352\270\260.py" | 3 +-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 "programmers/\354\247\235\354\210\230\354\231\200 \355\231\200\354\210\230.py" diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..befd501709d86348b16d08ea2ca951a7314a792a GIT binary patch literal 6148 zcmeHKyG{c^475p#NHi%a_ZRqs(!h|*uhckyYNv0WrOP-tjie6nZP z>)F*!alSP(@AsQ)v!$6W;6(dim>SpV6T7Gk(YeRd_Hh`t%wE>gSs-_2z1`XEW_Qeg zvv(Wp1@XaN@jPR+J1#l9wF;zw6p#W^Knh5KFBCw}rY(Nltg~KG3P^!}pa8!Q4NmL| z$He$_AjA~_I7d1R}aWl%$yykOF^70iUnds~)dZy>;?(?6nPk4` Date: Wed, 25 Jan 2023 15:13:43 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=ED=8F=89=EA=B7=A0=20=EA=B5=AC=ED=95=98?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5\354\210\230\354\231\200 \355\231\200\354\210\230.py" | 6 ------ ...1\352\267\240 \352\265\254\355\225\230\352\270\260.py" | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 "programmers/\354\247\235\354\210\230\354\231\200 \355\231\200\354\210\230.py" create mode 100644 "programmers/\355\217\211\352\267\240 \352\265\254\355\225\230\352\270\260.py" diff --git "a/programmers/\354\247\235\354\210\230\354\231\200 \355\231\200\354\210\230.py" "b/programmers/\354\247\235\354\210\230\354\231\200 \355\231\200\354\210\230.py" deleted file mode 100644 index fac9e40..0000000 --- "a/programmers/\354\247\235\354\210\230\354\231\200 \355\231\200\354\210\230.py" +++ /dev/null @@ -1,6 +0,0 @@ -def solution(num): - if num % 2 == 0: - return "Even" - - else: - return "Odd" \ No newline at end of file diff --git "a/programmers/\355\217\211\352\267\240 \352\265\254\355\225\230\352\270\260.py" "b/programmers/\355\217\211\352\267\240 \352\265\254\355\225\230\352\270\260.py" new file mode 100644 index 0000000..2ef80d9 --- /dev/null +++ "b/programmers/\355\217\211\352\267\240 \352\265\254\355\225\230\352\270\260.py" @@ -0,0 +1,8 @@ +def solution(arr): + answer = 0 + cnt = 0 + for i in range(len(arr)): + cnt += arr[i] + answer = cnt / len(arr) + + return answer \ No newline at end of file From f6b329a102d7642e8036db555bc00518579c5f82 Mon Sep 17 00:00:00 2001 From: xeonxeonx Date: Wed, 25 Jan 2023 15:17:14 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EC=95=BD=EC=88=98=EC=9D=98=20=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4\225\275\354\210\230\354\235\230 \355\225\251.py" | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 "programmers/\354\225\275\354\210\230\354\235\230 \355\225\251.py" diff --git "a/programmers/\354\225\275\354\210\230\354\235\230 \355\225\251.py" "b/programmers/\354\225\275\354\210\230\354\235\230 \355\225\251.py" new file mode 100644 index 0000000..fc9b0ba --- /dev/null +++ "b/programmers/\354\225\275\354\210\230\354\235\230 \355\225\251.py" @@ -0,0 +1,11 @@ +def solution(n): + answer = 0 + 리스트 = [] + + for i in range(1, n+1): + if n % i == 0: + 리스트.append(i) + + for i in range(len(리스트)): + answer += 리스트[i] + return answer \ No newline at end of file