diff --git "a/LiiNi-coder/202510/31 PGM \354\240\220\355\224\204\354\231\200 \354\210\234\352\260\204\354\235\264\353\217\231.md" "b/LiiNi-coder/202510/31 PGM \354\240\220\355\224\204\354\231\200 \354\210\234\352\260\204\354\235\264\353\217\231.md" new file mode 100644 index 00000000..eec98679 --- /dev/null +++ "b/LiiNi-coder/202510/31 PGM \354\240\220\355\224\204\354\231\200 \354\210\234\352\260\204\354\235\264\353\217\231.md" @@ -0,0 +1,19 @@ +```java +import java.util.*; + +public class Solution { + public int solution(int n) { + int ans = 0; + + while(n != 0){ + if(n%2 != 0){ + n--; + ans++; + } + n/=2; + } + + return ans; + } +} +```