-
Notifications
You must be signed in to change notification settings - Fork 3
week15~week19
#69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
week15~week19
#69
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0f402d1
solve: 순서쌍의 개수
sgoldenbird 659637a
solve: 세균 증식
sgoldenbird 865e74f
solve: 최대값 만들기 1
sgoldenbird 49ee0a7
solve: 모음 제거
sgoldenbird cdc8321
solve: 자릿수 더하기
sgoldenbird 0c1c3f3
solve: 머쓱이보다 키 큰 사람
sgoldenbird 1a748dc
solve: 삼각형의 완성조건1
sgoldenbird 5899150
solve: 배열 자르기
sgoldenbird 3100c19
solve: 점의 위치 구하기
sgoldenbird 257ac70
solve: 아이스 아메리카노
sgoldenbird File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # 정렬 함수 (오름차순, 내림차순) | ||
|
|
||
| 정렬함수가 a-b이든 b-a든, (a, b)를 넣었을때 음수면 a가 앞으로 양수면 b가 앞으로. | ||
|
|
||
| - 음수(<0) → a가 앞으로 | ||
| - 양수(>0) → b가 앞으로 | ||
| - 0 → 순서 유지 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| function solution(array, height) { | ||
| return array.filter((h) => h > height).length; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| function solution(my_string) { | ||
| const vowels = ["a", "e", "i", "o", "u"]; | ||
| let result = ""; | ||
|
|
||
| for (let ch of my_string) { | ||
| if (!vowels.includes(ch)) { | ||
| result += ch; | ||
| } | ||
| } | ||
|
|
||
| return result; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| function solution(numbers, num1, num2) { | ||
| return numbers.slice(num1, num2 + 1); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| function solution(sides) { | ||
| sides.sort((a, b) => a - b); | ||
| return sides[2] < sides[0] + sides[1] ? 1 : 2; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| function solution(n, t) { | ||
| return n * 2 ** t; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| function solution(n) { | ||
| let count = 0; | ||
|
|
||
| for (let i = 1; i <= Math.sqrt(n); i++) { | ||
| if (n % i === 0) { | ||
| if (i === n / i) { | ||
| count += 1; | ||
| } else { | ||
| count += 2; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return count; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| function solution(money) { | ||
| const price = 5500; | ||
| const cups = Math.floor(money / price); | ||
| const change = money % price; | ||
| return [cups, change]; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function solution(n) { | ||
| let sum = 0; | ||
| while (n > 0) { | ||
| sum += n % 10; | ||
| n = Math.floor(n / 10); | ||
| } | ||
| return sum; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function solution(dot) { | ||
| const [x, y] = dot; | ||
|
|
||
| if (x > 0 && y > 0) return 1; | ||
| if (x < 0 && y > 0) return 2; | ||
| if (x < 0 && y < 0) return 3; | ||
| return 4; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function solution(numbers) { | ||
| numbers.sort((a, b) => a - b); | ||
|
|
||
| const length = numbers.length; | ||
| const max = numbers[length - 1] * numbers[length - 2]; | ||
|
|
||
| return max; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.