Conversation
choyunju
approved these changes
May 30, 2025
| // m번 이하로 쪼개서 diff의 최댓값이 val이 되도록 만들수있는지? | ||
| int cnt = 0; | ||
| for (Integer num : diff) { | ||
| while (num > val) { |
Contributor
There was a problem hiding this comment.
나눗셈 사용하면 쉽게 구할 수 있습니다~!~!
Contributor
There was a problem hiding this comment.
바로 return 하는 방법을 순간 생각을 못했네요,,나머지는 저랑 비슷하게 푸셨어요! 수고하셨습니다!
|
|
||
| class Liquid implements Comparable<Liquid> { | ||
| int val; | ||
| int abs; |
Contributor
There was a problem hiding this comment.
제 코드에서도 나와있듯이 용액의 합을 음수냐 양수냐에 따라 구분하면 굳이 절댓값을 구하시지 않아도 됩니다!
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✅ 2470 | 두 용액 | 난이도: 골드 5 | 유형: 정렬, 그리디?
📝 문제 설명
💡 풀이 설명
✅ 20444 | 색종이와 가위 | 난이도: 골드 5 | 유형: 이분탐색
📝 문제 설명
💡 풀이 설명
✅ 1477 | 휴게소 세우기 | 난이도: 골드 4 | 유형: 이분탐색
📝 문제 설명
💡 풀이 설명