6월 16, 2023

백준 11005번 풀이

문제 10진수를 N진수로 변환하기 풀이 이거의 반대 버전이다. 변환하는 방법은 저기에 있으니 생략. 일단 로직 자체는 그렇게 어렵진 않다. 근데 코드를 보다보면 이게 뭔 개소린가 싶을 부분이 있으니 잘 따라오십셔....

Continue reading...

n진수->10진수 코딩하기

여기서 잠깐 언급했던 그거 맞다. 그것까지 주저리주저리 넣었다간 대참사 터져서 따로 뺐다. 참고로 기본 원리 역시 저기 서술되어있으므로 여기서는 생략. https://github.com/koreanraichu/Python/blob/master/Bin%20to%20Dec.py https://github.com/koreanraichu/Python/blob/master/Oct%20to%20Dec.py https://github.com/koreanraichu/Python/blob/master/Hex%20to%20Dec.py 코드와 깃헙은 순서대로 2, 8, 16진수. 변환하는...

Continue reading...

백준 2745번 풀이

문제 n진수 숫자를 10진수로 바꾸기 진수변환 수동으로 하는 법 아 이거… 10진수->n진수는 코딩한 게 있는데 반대 버전이 없어요… https://github.com/koreanraichu/Python/blob/master/Dec%20to%20Bin.py https://github.com/koreanraichu/Python/blob/master/Dec%20to%20Hex.py https://github.com/koreanraichu/Python/blob/master/Dec%20to%20Oct.py 순서대로 2, 16, 8진수로 변환하는 코드. 그럼 이제 원리를 알려드림....

Continue reading...