From 88355c912ca5c40f4d332877f345def3efa0a88f Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 02:39:05 +0900 Subject: [PATCH 1/8] =?UTF-8?q?[PGS]=20=EC=9D=8C=EC=96=91=EB=8D=94?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20/=20Level=201=20/=203m2s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" new file mode 100644 index 00000000..e69de29b From 0d02cbcad11fc27eecaaaddce7f202d4972d81a8 Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 02:46:10 +0900 Subject: [PATCH 2/8] =?UTF-8?q?[PGS]=20=EC=9D=8C=EC=96=91=EB=8D=94?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20/=20Level=201=20/=203m2s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyungHwan/Week04/1.js" | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" index e69de29b..0291132b 100644 --- "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" +++ "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/1.js" @@ -0,0 +1,8 @@ +function solution(absolutes, signs) { + let result = 0; + for(let i = 0; i < absolutes.length; i++){ + if(signs[i] === false){ + absolutes[i] = absolutes[i] * -1; + }result += absolutes[i] + }return result +} \ No newline at end of file From e87c35c8242e6c8fb434045145d844d24fd00493 Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 02:46:46 +0900 Subject: [PATCH 3/8] =?UTF-8?q?[PGS]=20=EC=97=86=EB=8A=94=EC=88=AB?= =?UTF-8?q?=EC=9E=90=EB=8D=94=ED=95=98=EA=B8=B0=20/=20Level=201=20/=205m?= =?UTF-8?q?=2030s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyungHwan/Week04/2.js" | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/2.js" diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/2.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/2.js" new file mode 100644 index 00000000..ea1a4b52 --- /dev/null +++ "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/2.js" @@ -0,0 +1,9 @@ +function solution(numbers) { + let result = 0; + + for(let j = 0; j < 10; j++){ + if(!numbers.includes(j)){ + result = result + j + } + }return result +} \ No newline at end of file From 698105ec98b5bda2d456362011277a38654291df Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 03:01:06 +0900 Subject: [PATCH 4/8] =?UTF-8?q?[PGS]=20=EA=B0=80=EC=9A=B4=EB=8D=B0=20?= =?UTF-8?q?=EA=B8=80=EC=9E=90=20=EA=B0=80=EC=A0=B8=EC=98=A4=EA=B8=B0=20/?= =?UTF-8?q?=20Level=201=20/=208m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyungHwan/Week04/3.js" | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/3.js" diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/3.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/3.js" new file mode 100644 index 00000000..957c357b --- /dev/null +++ "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/3.js" @@ -0,0 +1,7 @@ +function solution(s) { + let answer = s.length; + + if(answer % 2 === 0){ + return s[(answer/2) - 1] + s[answer/2] + } return s[((answer + 1) / 2) - 1] +} \ No newline at end of file From eb4613d565da90a0ab3d2a97c5afa0f6d21d017f Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 03:11:11 +0900 Subject: [PATCH 5/8] =?UTF-8?q?[PGS]=20=EC=88=98=EB=B0=95=EC=88=98?= =?UTF-8?q?=EB=B0=95=EC=88=98=EB=B0=95=EC=88=98=3F=20/=20Level=201=20/=206?= =?UTF-8?q?.30s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/4.js" | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/4.js" diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/4.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/4.js" new file mode 100644 index 00000000..45679b36 --- /dev/null +++ "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/4.js" @@ -0,0 +1,4 @@ +function solution(n) { + let answer = '수박'.repeat(n/2) + return n % 2 === 0 ? answer : answer + '수'; +} \ No newline at end of file From 33787f2f72c4945173e6b60df51faef4e69a7ce9 Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 03:25:15 +0900 Subject: [PATCH 6/8] =?UTF-8?q?[PGS]=20=EB=82=B4=EC=A0=81=20/=20Level=201?= =?UTF-8?q?=20/=2011m=2051s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" new file mode 100644 index 00000000..e69de29b From 42cd669c75096daec6ff542bbc426f16daf84830 Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 03:32:31 +0900 Subject: [PATCH 7/8] =?UTF-8?q?[PGS]=20=EB=AC=B8=EC=9E=90=EC=97=B4=20?= =?UTF-8?q?=EB=82=B4=EB=A6=BC=EC=B0=A8=EC=88=9C=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B0=B0=EC=B9=98=ED=95=98=EA=B8=B0=20/=20Level=201=20/=2010m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/6.js" | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/6.js" diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/6.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/6.js" new file mode 100644 index 00000000..8275d701 --- /dev/null +++ "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/6.js" @@ -0,0 +1,3 @@ +function solution(s) { + return s.split("").sort().reverse().join(""); +} From a3217060d9456a7d3dcc66a7e8703ff7f90043f3 Mon Sep 17 00:00:00 2001 From: "[firstname lastname]" <[valid-email]> Date: Wed, 23 Nov 2022 03:36:22 +0900 Subject: [PATCH 8/8] =?UTF-8?q?[PGS]=20=EB=82=B4=EC=A0=81=20/=20Level=201?= =?UTF-8?q?=20/=2011m=2051s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" | 4 ++++ 1 file changed, 4 insertions(+) diff --git "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" index e69de29b..055469c1 100644 --- "a/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" +++ "b/\354\210\230\354\232\224\354\235\274/MyungHwan/Week04/5.js" @@ -0,0 +1,4 @@ +function solution(a, b) { + + return a.reduce((acc, cur, idx) => acc += a[idx] * b[idx], 0) +} \ No newline at end of file