From 3c0ba1164996ca155785be430b2929e65e28d88a Mon Sep 17 00:00:00 2001 From: yujin Jeon <101913688+yuj2n@users.noreply.github.com> Date: Tue, 23 Sep 2025 20:15:36 +0900 Subject: [PATCH 1/4] =?UTF-8?q?solve:=20n=EC=9D=98=20=EB=B0=B0=EC=88=98=20?= =?UTF-8?q?=EA=B3=A0=EB=A5=B4=EA=B8=B0=20=EB=AC=B8=EC=A0=9C=ED=92=80?= =?UTF-8?q?=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\230_\352\263\240\353\245\264\352\270\260.js" | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 "yujin-level0/Week20/n\354\235\230_\353\260\260\354\210\230_\352\263\240\353\245\264\352\270\260.js" diff --git "a/yujin-level0/Week20/n\354\235\230_\353\260\260\354\210\230_\352\263\240\353\245\264\352\270\260.js" "b/yujin-level0/Week20/n\354\235\230_\353\260\260\354\210\230_\352\263\240\353\245\264\352\270\260.js" new file mode 100644 index 0000000..e18d567 --- /dev/null +++ "b/yujin-level0/Week20/n\354\235\230_\353\260\260\354\210\230_\352\263\240\353\245\264\352\270\260.js" @@ -0,0 +1,15 @@ +function solution(n, numlist) { + var answer = []; + + for (let i = 0; i <= numlist.length; i++) { + if (numlist[i] % n === 0) { + answer.push(numlist[i]); + } + } + return answer; +} + +// 참고용 +// function solution(n, numlist) { +// return numlist.filter((num) => num % n === 0); +// } From 1575b0bf4280d3b511274ef5250cfda7cab2a280 Mon Sep 17 00:00:00 2001 From: yujin Jeon <101913688+yuj2n@users.noreply.github.com> Date: Tue, 23 Sep 2025 20:15:54 +0900 Subject: [PATCH 2/4] =?UTF-8?q?solve:=20=EB=B0=B0=EC=97=B4=EC=9D=98=20?= =?UTF-8?q?=EC=9C=A0=EC=82=AC=EB=8F=84=20=EB=AC=B8=EC=A0=9C=ED=92=80?= =?UTF-8?q?=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...35\230_\354\234\240\354\202\254\353\217\204.js" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 "yujin-level0/Week20/\353\260\260\354\227\264\354\235\230_\354\234\240\354\202\254\353\217\204.js" diff --git "a/yujin-level0/Week20/\353\260\260\354\227\264\354\235\230_\354\234\240\354\202\254\353\217\204.js" "b/yujin-level0/Week20/\353\260\260\354\227\264\354\235\230_\354\234\240\354\202\254\353\217\204.js" new file mode 100644 index 0000000..0373ac1 --- /dev/null +++ "b/yujin-level0/Week20/\353\260\260\354\227\264\354\235\230_\354\234\240\354\202\254\353\217\204.js" @@ -0,0 +1,14 @@ +function solution(s1, s2) { + let count = 0; + for (i = 0; i < s1.length; i++) + if (s2.includes(s1[i])) { + count++; + } + return count; +} + +// 참고용 +// function solution(s1, s2) { +// const answer = s1.filter((x) => s2.includes(x)); // s1의원소(x)를 하나씩 필터할건데, s2가 해당 원소를 가지는 것만 빼서 배열로 만든다. +// return answer.length; +// } From 83bc0bc73c6564a6cd4c08230ac2fad7b9b48b18 Mon Sep 17 00:00:00 2001 From: yujin Jeon <101913688+yuj2n@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:43:05 +0900 Subject: [PATCH 3/4] =?UTF-8?q?solve:=20=EB=AC=B8=EC=9E=90=EC=97=B4=20?= =?UTF-8?q?=EB=92=A4=EC=9D=98=20n=EA=B8=80=EC=9E=90=20=ED=92=80=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\353\222\244\354\235\230_n\352\270\200\354\236\220.js" | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 "yujin-level0/Week21/\353\254\270\354\236\220\354\227\264\354\235\230_\353\222\244\354\235\230_n\352\270\200\354\236\220.js" diff --git "a/yujin-level0/Week21/\353\254\270\354\236\220\354\227\264\354\235\230_\353\222\244\354\235\230_n\352\270\200\354\236\220.js" "b/yujin-level0/Week21/\353\254\270\354\236\220\354\227\264\354\235\230_\353\222\244\354\235\230_n\352\270\200\354\236\220.js" new file mode 100644 index 0000000..ebe3847 --- /dev/null +++ "b/yujin-level0/Week21/\353\254\270\354\236\220\354\227\264\354\235\230_\353\222\244\354\235\230_n\352\270\200\354\236\220.js" @@ -0,0 +1,8 @@ +function solution(my_string, n) { + return my_string.slice(-n); +} + +// 참고용 +// function solution(my_string, n) { +// return my_string.substring(my_string.length - n); +// } From 9747e954692b3ed565782d9b5f29634a6364f1ec Mon Sep 17 00:00:00 2001 From: yujin Jeon <101913688+yuj2n@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:43:14 +0900 Subject: [PATCH 4/4] =?UTF-8?q?solve:=20=EB=B0=B0=EC=97=B4=20=EC=9B=90?= =?UTF-8?q?=EC=86=8C=EC=9D=98=20=EA=B8=B8=EC=9D=B4=20=ED=92=80=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\206\214\354\235\230_\352\270\270\354\235\264.js" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "yujin-level0/Week21/\353\260\260\354\227\264_\354\233\220\354\206\214\354\235\230_\352\270\270\354\235\264.js" diff --git "a/yujin-level0/Week21/\353\260\260\354\227\264_\354\233\220\354\206\214\354\235\230_\352\270\270\354\235\264.js" "b/yujin-level0/Week21/\353\260\260\354\227\264_\354\233\220\354\206\214\354\235\230_\352\270\270\354\235\264.js" new file mode 100644 index 0000000..5ac661d --- /dev/null +++ "b/yujin-level0/Week21/\353\260\260\354\227\264_\354\233\220\354\206\214\354\235\230_\352\270\270\354\235\264.js" @@ -0,0 +1,12 @@ +function solution(strlist) { + let answer = []; + for (let i = 0; i < strlist.length; i++) { + answer.push(strlist[i].length); + } + return answer; +} + +// 참고용 +// function solution(strlist) { +// return strlist.map((el) => el.length) +// }