We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c6117f0 + 6b16a5a commit 651a1aeCopy full SHA for 651a1ae
1 file changed
lkhyun/202512/11 PGM Lv2 다음 큰 숫자.md
@@ -0,0 +1,12 @@
1
+```java
2
+class Solution {
3
+ public int solution(int n) {
4
+ int cur = Integer.bitCount(n);
5
+
6
+ while(true){
7
+ n++;
8
+ if(Integer.bitCount(n) == cur) return n;
9
+ }
10
11
+}
12
+```
0 commit comments