
GitHub :https://github.com/kwon1232/CodingTest/tree/main/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4/2/12980.%E2%80%85%EC%A0%90%ED%94%84%EC%99%80%E2%80%85%EC%88%9C%EA%B0%84%E2%80%85%EC%9D%B4%EB%8F%99 #include using namespace std;int solution(int n){ int ans = 0; while(n > 0) { if (n % 2 == 0) n/=2; else { n -= 1; ans++; }..