-
Notifications
You must be signed in to change notification settings - Fork 4
[11주차] 이예진 #156
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
[11주차] 이예진 #156
Conversation
BOJ/1000-5000번/YJ_1052.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예진님 이슈보고 리뷰남깁니다!
0
은 상점에서 추가로 사야할 물병이 없을 경우,
-1
은 상점에서 물병을 추가로 사도 정답을 못만들 경우를 의미합니다.
10의 경우 2^3, 2^1로 총 2개의 물병으로 존재하고, K=3을 넘지않는 물병을 이미 만들었기때문에 상점에서 추가로 구매하지 않아도돼서 0으로 출력하는게 맞습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하! 그렇군요!
문제에서 "물병의 물을 적절히 재분배해서, K개를 넘지 않는 비어있지 않은 물병" 이라고 적혀있어서 저는 K개 이내로만 물병을 만들면 된다! 로 이해했거든요
그래서 "상점에서 물병을 추가로 사도 정답을 못만들 경우" 가 K 개 만큼 물병을 만들지 못하는 경우도 포함되는건지 몰랐었어요 ᅮᅮ!
No description provided.