• Skip to primary navigation
  • Skip to content
  • Skip to footer
fullfish fullfish 일상을 더 가볍게 만드는 앱을 만듭니다
  • Apps
  • Blog

    fullfish

    just studying

    • 전주

    이진 변환 반복하기

    코드

    function solution(s) {
      let count_counter = 0;
      let zero_counter = 0;
      while (s !== "1") {
        let temp = s.replace(/0/g, "");
        zero_counter += s.length - temp.length;
        s = temp.length.toString(2);
        count_counter++;
      }
      return [count_counter, zero_counter];
    }
    

    카테고리: 코딩 테스트, 프로그래머스 level2

    업데이트: September 8, 2022

    공유하기

    Twitter Facebook LinkedIn
    이전 다음

    참고

    fullweight 개인정보 처리방침 [ Project / fullweight ]

    https://github.com/full-fish/fullweight/blob/main/PRIVACY_POLICY.md

    멀티캠퍼스 KDT 데이터 분석가 최종 프로젝트 6차 수행일지 [ Project / multicampus-project ]

    [6차 프로젝트 수행일지_Tensor.docx

    멀티캠퍼스 KDT 데이터 분석가 최종 프로젝트 5차 수행일지 [ Project / multicampus-project ]

    [5차 프로젝트 수행일지_Tensor.docx

    멀티캠퍼스 KDT 데이터 분석가 최종 프로젝트 4차 수행일지 [ Project / multicampus-project ]

    [4차 프로젝트 수행일지_Tensor.docx

    • 팔로우:
    • 피드
    © 2026 fullfish. Powered by Jekyll & Minimal Mistakes.