알고리즘/프로그래머스
Programers 이진 변환 반복하기
https://school.programmers.co.kr/learn/courses/30/lessons/70129 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 프로그래머스 이진 변환 반복하기 문제입니다. 아이디어 단순 구현문제입니다. 비트연산자를 많이 쓰려고 노력했습니다. #include #include #include using namespace std; string convertBinary(int n) { string temp = ""; while (n != 0) { temp.append(to_string((int)n & 1)); n = n >> 1..
2022. 9. 11.