-
Notifications
You must be signed in to change notification settings - Fork 3
Week48 문제풀이
#425
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
Week48 문제풀이
#425
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // https://school.programmers.co.kr/learn/courses/30/lessons/181847 | ||
|
|
||
| function solution(n_str) { | ||
| for (let i = 0; i < n_str.length; i++) { | ||
| if (n_str[i] !== '0') { | ||
| return n_str.slice(i); | ||
| } | ||
| } | ||
| } |
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,9 @@ | ||
| // https://school.programmers.co.kr/learn/courses/30/lessons/181841 | ||
|
|
||
| function solution(str_list, ex) { | ||
| let answer = ''; | ||
| for (let str of str_list) { | ||
| if (!str.includes(ex)) answer += str; | ||
| } | ||
| return answer; | ||
| } |
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,11 @@ | ||
| // https://school.programmers.co.kr/learn/courses/30/lessons/181842 | ||
|
|
||
| function solution(str1, str2) { | ||
| return str2.includes(str1) ? 1 : 0; | ||
| } | ||
|
|
||
| // 다른 풀이 | ||
| // true → 1, false → 0 변환이 자동으로 일어난다 | ||
| /** | ||
| * return Number(str2.includes(str1)); | ||
| */ |
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,5 @@ | ||
| // https://school.programmers.co.kr/learn/courses/30/lessons/181843 | ||
|
|
||
| function solution(my_string, target) { | ||
| return Number(my_string.includes(target)); | ||
| } |
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 @@ | ||
| // https://school.programmers.co.kr/learn/courses/30/lessons/70128 | ||
|
|
||
| function solution(a, b) { | ||
| let sum = 0; | ||
| const len = a.length; | ||
gpfksdlrn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| for (let i = 0; i < len; i++) { | ||
| sum += a[i] * b[i]; | ||
| } | ||
|
|
||
| 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,7 @@ | ||
| // https://school.programmers.co.kr/learn/courses/30/lessons/12935 | ||
|
|
||
| function solution(arr) { | ||
| if (arr.length <= 1) return [-1]; | ||
| const min = Math.min(...arr); | ||
| return arr.filter(num => num !== min); | ||
| } |
Oops, something went wrong.
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.