본문 바로가기

개인용 복습공간

검색하기
개인용 복습공간
프로필사진 taehwanis

  • 분류 전체보기 (25)
    • Java (6)
    • Android (3)
    • 웹 (5)
      • Jsp, Servlet (5)
      • Linux (0)
    • Python (5)
    • DB (0)
    • programmers (5)
    • 일상 (1)
Guestbook
Recent Posts
Recent Comments
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
  • 프로그래머스
  • 메모장
  • jsp
  • 형태소 분석기
  • 개발자
  • 코딩
  • Programmers
  • 유튜브
  • js
  • 프로그래밍
  • jdbc
  • 모바일
  • 자바스크립트
  • 셀레니움
  • n^2 배열 자르기
  • 파이썬
  • 크롤링
  • javascript
  • 이진 변환 반복하기
  • 세션
  • 함수형 인터페이스
  • 데이터베이스
  • 자바
  • 입출력
  • 개발
  • android
  • java
  • 파일 저장
  • Python
  • MySQL
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록이진 변환 반복하기 (1)

개인용 복습공간

프로그래머스 - 이진 변환 반복하기

toString으로 이진 변환 function solution(s) { let delemination = 0, trans = 0, cnt = 0; while(s != 1){ delemination += s.replace(/1/g, '').length; trans = s.replace(/0/g, '').length; s = trans.toString(2); cnt++; } return [cnt, delemination]; }

programmers 2023. 10. 12. 17:39
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바