[programmers][X] 이진 변환 반복하기
in Algorithm on Algorithm
https://school.programmers.co.kr/learn/courses/30/lessons/70129
class Solution {
public int[] solution(String s) {
int[] answer = {0,0};
while(!s.equals("1")){
String temp = s.replace("0","");
answer[1] += (s.length() - temp.length());
s = temp;
s = Integer.toBinaryString(s.length());
answer[0]++;
}
return answer;
}
}